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

Bug 249412

Summary: [web connector] implement support for context attachments
Product: z_Archived Reporter: Menon <menonbugzilla>
Component: MylynAssignee: Project Inbox <mylyn-triaged>
Status: CLOSED MOVED QA Contact:
Severity: enhancement    
Priority: P4 Keywords: helpwanted
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Menon CLA 2008-10-01 18:24:50 EDT
Build ID: 3.4

Steps To Reproduce:
1. I craeted a generic web connector based repository using templates ( SQL based)
2. I try to "Attach context"
3. It says "Task repository does not support attachements"
4. It would be great if someone could support this for the generic web connector. This is a feature that we really would like to have.


More information:
When I posted the question about attachments in the Newsgroup, "Eugene Kuleshov" suggested that I submit a bug report. This is what he suggested to get this implemented in the generic web connector
 "So, it is relatively easy to implement support for attaching the task context in the web connector. The only issue is how to generalize required configuration. Other then that, api on mylyn side is more or less straightforward.

  Basically, in most cases, attaching something would require http post call to some URL with content type set to multipart/form-data. The call would need to have number of fields specified and should also include field for the attachment body, which is usually declared in html like this:

  <input name="data" type="file">

  So, the easiest way to configure that would be to add additional parameters to the connector configuration. It need to be an url with number of parameters required by the web server in order to submit an attachment. Values for some of those parameters would need to be substituted from variables, such as ${Id} ${Description} and ${Attachment}, for example:

  ${serverUrl}/attach/?taskId=${Id}&description=${Description}&data=${Attachment}&someOtherField=foo

  Then attachment submission can parse that url and construct the corresponding post request for submitting attachment. Generally not much different from submitting requests for task queries."
Comment 1 Steffen Pingel CLA 2008-10-01 18:46:02 EDT
I agree that that would be a useful addition. We do not have the resources within the Mylyn project to implement this though but I would be happy to review a contribution.
Comment 2 Eclipse Webmaster CLA 2022-11-15 11:45:08 EST
Mylyn has been restructured, and our issue tracking has moved to GitHub [1].

We are closing ~14K Bugzilla issues to give the new team a fresh start. If you feel that this issue is still relevant, please create a new one on GitHub.

[1] https://github.com/orgs/eclipse-mylyn