Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 150078

Summary: add actions to save/retrieve context via drag and drop
Product: z_Archived Reporter: Eugene Kuleshov <ekuleshov>
Component: MylynAssignee: Mik Kersten <mik.kersten>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: robert.elves
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:
Attachments:
Description Flags
mylar/context/zip
none
fix for dropping context file into query hit none

Description Eugene Kuleshov CLA 2006-07-08 10:03:45 EDT
Current action for attaching context to issues does not allow to things like emailing context or manual attachment to issue (e.g. when not supported by issue tracking provider)
Comment 1 Mik Kersten CLA 2006-07-11 13:13:06 EDT
I've wanted this too.  It would be easy if there were a mailto: hyperlink that could attach a local file.  I did a quick search and found the following syntax but it does not appear to work.  Do you know of anything?

http://help.lockergnome.com/office/MailTo-link-attachments-ftopict679128.html
Comment 2 Eugene Kuleshov CLA 2006-07-11 13:34:56 EDT
I'd prefer to drag from task list to the mail editor, so it would create an attachment file when dragging .java file from Package Explorer.

Though I'd be ok with saving context to external file too...
Comment 3 Mik Kersten CLA 2006-07-11 18:56:24 EDT
I want to avoid the saving to external because it's too many clicks.  But I like the dnd approach because it also supports dragging from the mail app into the Task List, and it seems to replace the need for the copy and pasting which can get confusing.  Here is what I implemented:
1) A task can be dragged to anything that accepts a file (e.g. folder window, email message), and the context file will be copied to the target.
2) If the target accepts text transfers the text is the same description/url combo that Ctrl+C does
3) If a context file is dragged onto a task that context is copied into the task to replace its' previous context after a dialog confirmation.
Comment 4 Mik Kersten CLA 2006-07-11 18:56:48 EDT
Created attachment 46139 [details]
mylar/context/zip
Comment 5 Eugene Kuleshov CLA 2006-07-11 19:31:51 EDT
I see that task can be dragged now, but I don't actually see that it is allowed to be dropped to windows folders or Thunderbird message editor.
Comment 6 Mik Kersten CLA 2006-07-11 20:17:22 EDT
I tested it with Windows Explorer, Internet Explorer and Outlook and it works.  As you indicate unfortunately it is failing with Thunderbird, and with Firefox as well.  Oddly the Navigator views file transfers work with those and I tried to mimick their code.  I just took a look to see if there was anything obvious I missed but didn't notice anything but will take a closer look after higher priority items are out of the way.
Comment 7 Eugene Kuleshov CLA 2006-07-11 20:42:28 EDT
Hmm. It didn't work for me even with Windows Explorer. At least I couldn't drag issue from query hit to the opened windows folder.
Comment 8 Mik Kersten CLA 2006-07-11 21:03:45 EDT
I just verified that dragging tasks from both Bugzilla and JIRA queries works, so I'll need more details to reproduce the failure you saw.
Comment 9 Eugene Kuleshov CLA 2006-07-11 21:11:25 EDT
Weird. It seems like I missed some part of you commit.

Dragging out is working now and create files like "https%3A%2F%2Fbugs.eclipse.org%2Fbugs-150078.xml" (would be nicer to actually use description text) but I can't that file drag it back to the Task List view.
Comment 10 Eugene Kuleshov CLA 2006-07-11 21:14:41 EDT
Realized that it does not work only for query hits.

BTW, it would be really nice if that fille is formatted (pretty printd) and zipped like one you attach to the bugzilla... ;-)
Comment 11 Mik Kersten CLA 2006-07-11 21:46:12 EDT
I was thinking that we should probably be creating a single zip with the task information:
- task info: for a local task the details, for a repository task the handle and repository information
- repository information (without credentials) if a repository task
- the context

The dragging a task.zip to a container would have the effect of adding it, and dragging a task to another task would have the effect of transfering the contexts.  This would work identically for whether the task was internal to the task list or an external zip file and avoids us creating a new file extension, etc.  We should probably put an identifying manifest in the zip though.

Rob: added you to the CC since this is getting interesting.
Comment 12 Mik Kersten CLA 2006-09-15 20:50:54 EDT
This was resolved a while back.  For the fancier functionality specified on comment#11 I created bug 157546
Comment 13 Eugene Kuleshov CLA 2006-12-08 20:34:00 EST
Created attachment 55345 [details]
fix for dropping context file into query hit