Community
Participate
Working Groups
As suggested by Eugene Kuleshov, draggin a URL to the task list could automatically create a new task and open it. Or perhaps launch the create task dialog with the corresponding values filled in.
*** Bug 110701 has been marked as a duplicate of this bug. ***
Created attachment 32493 [details] Patch to allow drag and drop of urls from mozilla to Mylar task list Tested using Firefox version 1.5. Currently does not work with Internet Explorer.
Nice work, patch applied. Let's explore the URL transfer issue a bit more before giving up, sine the URL transfer class is quite straightforward and we may want to use our own to make it work with IE, and fail gracefully on any platform that the URL transfer was not properly supported?
Created attachment 32645 [details] IE support for URL drag and drop to task list This patch adds support for dragging urls from Internet Explorer. User must press CTRL key when dropping onto task list. Task title retrieved from site. Still some work to do in order to eliminate duplicate code shared by TaskLIstDropAdapter and TaskInputDialog.
Wow, great! Why does Ctrl have to be pressed? Is there any way to get around that?
My understanding is that the current DnD operations supported by Internet Explorer are DND.DROP_COPY and DND.DROP_LINK. In order to get either of these to work requires a key modifier: CRTL for COPY, CTRL+SHIFT for link. If one of these key modifiers are not used DND.DROP_DEFAULT is the resulting operation. DND.DROP_DEFAULT is hard coded (see org.eclipse.swt.dnd.DropTarget) to DND.DROP_MOVE. Unfortunately DND.DROP_MOVE is not one of the operations supported by IE. This results in no operation (DND.DROP_NONE), hence the need to hold CTRL down when dropping onto the task list.
Patch applied and some API fixing done to ensure that only one retrieval mechanism is used.
Eugene had the following two comments that we should address - It does not fetch task description if url was taken from the link (e.g. list of bugs from the report). This one is really sad. :-( - It does not add task under task group if drop target is pointing to the group row. Eugene: what do you mean by the first one?
(In reply to comment #8) > Eugene had the following two comments that we should address > - It does not fetch task description if url was taken from the link (e.g. list > of bugs from the report). This one is really sad. :-( I meant that it takes description from the link (basically what was in the text of the <a href...>...</a> tag), but not thom the head/title of the url where that <a href...> is pointing to. > - It does not add task under task group if drop target is pointing to the group > row. Actully it is aways drop target at the root, but I would expect it to be dropped into group if group node is targeted or target is somehwre between nodes of some group.
1) That's the platform's drag and drop behavior (e.g. Windows), and I think that we need to stay consistent with that even though it's not ideal. Fyi you can drag from the Address bar icon as well (adding that to the new & noteworthy). 2) Rob, could you fix this? The code for determining the neighbor tasks caregory is already there since that's how dragging between categories works. Also as part of this, could you ensure that the task editors are always linked with the view (i.e. if an editor is selected the task gets highlighted). It can be confusing to know where the dragged task went without this.
(In reply to comment #10) > 1) That's the platform's drag and drop behavior (e.g. Windows), and I think > that we need to stay consistent with that even though it's not ideal. Just think about it. I may want to drag URL from anywhere, but it would make sense to see title of the actual page at this URL. I just tried to grag url from this bug notification email in Thunderbird and Mylar created a task with descruption "https://bugs.eclipse.org/bugs/show_bug.cgi?id=1144...". I would expect it to work the same way as paste url + "get description" in create new task dialog. So, I guess the right way is to ignore "title" returned by platform and actually fetch the title for the url like it is done by "get description" action. > Fyi you can drag from the Address bar icon as well (adding that to the new & > noteworthy). That is what I have to do now, but for this I have to open every next issue from the issue tracker report (e.g. issues assigned to me or targeted for given version).
Allright, re. (1) I guess that the benefit is obvious enough that we should consider ignoring the title that the transfer is giving us and fetch it. It's not like we can get the title wrong that way, and the only cost is possible inconsistency with other URL drop behavior and time to connect. Rob, what do you think?
Created attachment 33131 [details] Get page title from url over network by default, capability to drop into categories Thanks for your input on this guys. This patch makes the call to the url for the title rather than accepting the title from the browser's DND string. (Mik, this of course breaks the test due to async issues so removed it...we'll talk) This patch also adds functionality for dropping into categories. One feature that perhaps we should also consider is when a link is dropped from a known repository, the appropriate task type should be added rather than a generic local task (i.e. a 'existing' BugzillaTask should get added when dropped). Thoughts?
Mik: Working on selection of editors so that selection happens in Task view. It works for regular tasks but problems arise with bugzilla hits. The Bugzilla editor returns a task but the view has IQueryHit objects for the Bugzilla tasks. Is there a utility method for getting the IQueryHit object associated with a particular BugzillaTask?
Good stuff, patch applied. Leaving open until we re-enable that test by making the test run the URL fetech syncrhonously via job.run(..). Regarding the dropping being smart about repository URLs that it knows about, that's an interesting idea. I think that we should keep it simple for now sine the common case is to use queries via the built in support if there is a repository client, but let's keep this mind. Regarding comment#14, we don't have a method yet. You could make something similar to the following for finding the list of queries, and the UI should probably just highlight the top-most one. MylarTaskListPlugin.getTaskListManager().getTaskForHandle(handle, lookInArchives);
Created attachment 33227 [details] Synchronizes selection of TaskEditor with Task view selection
Test now checks URL, does not check retrieval of title due to synchronization issue with browser.