It's all about the answers!

Ask a question

Is there a command line option available to download attachments of a work item?


Chethna Shenoy (3644) | asked Aug 30 '12, 5:36 a.m.
JAZZ DEVELOPER
If there is a file attached in the links section of a work item. is there any way to download it using command line?

Accepted answer


permanent link
Ralph Schoon (63.1k33646) | answered Aug 30 '12, 5:44 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi,

no, there is no command line tool available for work items and also no tool to download attachments OOTB. You can write a tool using the Plain Java Client Libraries. See https://rsjazz.wordpress.com/2012/08/01/uploading-attachments-to-work-items/ for the reverse operation. I assume you could figure out how to download from that.
Ralph Schoon selected this answer as the correct answer

Comments
Chethna Shenoy commented Sep 03 '12, 5:39 a.m. | edited Sep 20 '12, 2:03 p.m.
JAZZ DEVELOPER

Thank you for your answers. Will look at the proposed solution.


Ralph Schoon commented Sep 20 '12, 12:20 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Chethna, please accept an answer you find most appropriate in the future. this helps keeping the forums maintained.

2 other answers



permanent link
Nick Edgar (6.5k711) | answered Aug 31 '12, 3:23 p.m.
JAZZ DEVELOPER
 There's also the OSLC CM API.  For example, https://jazz.net/jazz/oslc/workitems/74964?OSLC-Core-Version=2.0 contains:
<rtc_cm:com.ibm.team.workitem.linktype.attachment.attachment rdf:ID="n4"rdf:resource="https://jazz.net/jazz/resource/itemOid/com.ibm.team.workitem.Attachment/_0g3i8BfSEd63kMlrUwKMrg"/>

Unfortunately that request is blocked by out whitelist on jazz.net, but it may work for your server.
I would return an item describing the attachment, not the attachment contents itself, but should contain the content id.  The content could then be fetched using <repo root>/content/<contentId>.

I'm having trouble giving a better example at the moment because my VPN is down.

Comments
Nick Edgar commented Aug 31 '12, 3:24 p.m.
JAZZ DEVELOPER

Note that the rtc_cm:...attachment property is RTC-specific, so this approach would not work with any other OSLC CM provider.


permanent link
Nick Edgar (6.5k711) | answered Sep 20 '12, 2:03 p.m.
JAZZ DEVELOPER
See also existing enhancement request Command line interface for work items (83846)

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.