Remove vs. delete attachment - some findings and a question
just found out by trial and error that the two permissions given for Team Configuration --> save work item --> modify work item --> modify work item links --> modify the work item's attachments
a) delete attachments
b) remove attachments
differ as follows:
Deleting attachments can be executed from Eclipse client by right clicking on an attachment in the link view of a work item. The attachment is deleted from the repository and links referring to it from elsewhere are dead.
Removing an attachment can be done from either web or Eclipse client by clicking the red remove cross right of the attachment link in the link view of a work item. The attachment still remains in the repository and can be referenced by e.g. attachment 115.
Question:
If I remove an attachment from a work item, how can I retrieve it such that I can actually delete it from the repository? I have not found a good way of doing this.
- Arne
Accepted answer
In order to delete a removed attachment, you need to reattach it to a work item, which will then give you the ability to delete the attachment.
This needs to be done via the Eclipse rich client
- open the work item where the attachment has been removed
- check whether there is a textual reference to the attachment in the discussion.
If yes right click on the attachment reference > Add to Favorites.
- OR -
If there is no textual reference find the ID of the attachment in the work item's history and type "attachment <ID>" as a new comment (but don't save).
right click on the attachment reference > Add to Favorites
Now you can delete the attachment
delete the "attachment <ID>" comment
- drop the attachment from favorites to the attachment section
- you should now be able to right click > delete on the attachment
- save the work item
Comments
This worked, but I was confused on what the last part was telling me to do.
You have to re-add the attachment from your favorites back to the work item so that you can delete from the work item.
So you drag your attachment from the Favorites section into the Attachments section of the work item. Then from there, you can delete the attachment.
These steps came in handy today. Thanks.
I found these steps very helpful today. IBM techs didn't even know about it.
Thanks.
1 vote
One other answer
I tried the steps in version 5.0.2 but it doesn't work. I'm able to open the attachment within the discussion section after that.
Is there now another way to delete attachments from workitems ?
Comments
It still works with RTC 5.0.2. Make sure that you have followed Steve's steps exactly, particularly "delete" the attachment, not "remove" the attachment.
Thanks Donald for the answer. The problem was that Steve mentioned to move the attachment from the favorites to the links tab. In this tab there is no delete function available.
It's necessary to move to the attachment tab. There you can select between remove and delete.
I've updated Steve's answer to make that correction.