It's all about the answers!

Ask a question

Check new attachment is added/deleted from work item

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


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.


One answer

permanent link
Ralph Schoon (61.5k33643) | answered Jan 23 '17, 4:35 a.m.
edited Jan 23 '17, 4:38 a.m.

You can try to create a pre condition/advisor for work item save. See 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: . 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.