It's all about the answers!

Ask a question

Check new attachment is added/deleted from work item


Anurag Patel (21868) | asked Jan 23 '17, 3:26 a.m.

Hi,


I have to check in that, In work item is there any new attachment file is added/deleted using Java API's.
How can I check that any new attachment is added or old file is deleted from work item.
Which API I should use to identify the attachment information of work item.

Thanks

One answer



permanent link
Ralph Schoon (63.5k33646) | answered Jan 23 '17, 4:35 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Jan 23 '17, 4:38 a.m.

You can try to create a pre condition/advisor for work item save. See https://rsjazz.wordpress.com/2014/05/26/only-owner-can-close-workitem-advisor/ as an example for such an advisor. It shows the operation ID and the extension point you need. Follow the getting started here and do the extensions workshop mentioned. This is the attachment API: https://rsjazz.wordpress.com/2012/09/21/downloading-attachments-from-work-items/ . The link API used to find the attachments is a common API and is available to server extensions as well.

In the advisor, you will have to get the old state of the work item prior to the save and the new state after the save and compare all the attachment data.

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.