It's all about the answers!

Ask a question

What is best practice for work item attachments?


Timothy Distel (73112) | asked Oct 21 '19, 11:25 a.m.

 Hello,


Currently using CLM suite 6.0.6.

I'm curious as to what the best practices are as far as utilizing attachments for work items. We've noticed that each time an attachment is added a unique ID is assigned to that attachment. Since the "mentions" link type/functionality exists it allows users to reference an existing attachment in comments, description & summary using that ID, but utilizing this functionality does not mirror the attachment properties in that it cannot be queried on in the same way.

Take this use case for example:

We have one file which should be an attachment on 4 different work items. Is the intended use to attach the file to one work item and use the mention functionality for the other 3, or to attach the file to all 4 creating a unique ID for each instance of the same file along the way? I prefer actually attaching files (not "mentioning") to each work item so that there are more queryable parameters like being able to identify all work items that have a particular file name. This results in one file being associated multiple UIDs, each as its own separate attachment. Are there any negative implications (thinking long term) of using it one way vs the other or is it simply a decision of what works best for the customer?


Comments
Timothy Distel commented Oct 23 '19, 1:43 p.m.

Great links Ian. I couldn't find that forum discussion you provided, I may need to optimize my keywords. In that thread it is actually mentioned that it would be good to implement a policy to, on some cycle, delete old/unneeded attachments. A follow up question I would have is what is the best way to go about that? Is there any other means to go about that other than accessing individual work items and deleting the attachments from them?


Ian Wark commented Oct 24 '19, 12:05 a.m.
Ralph Schoon has developed a utility which allows to delete all attachments based on a work item query. You could use something like the below..

WorkItemCommandLine
-bulkupdate repository="value"
user="value" password="value"
query="value" querysource="value"
/enableDeleteAttachment
/enableDeleteApprovals
/skipEmailNotification
/enforceSizeLimits
/ignoreErrors {parameter[:mode]=value}


Timothy Distel commented Oct 24 '19, 10:58 a.m.

Awesome, thanks for the help Ian. I would select this as the correct answer but since it is a comment I'm unable to

One answer



permanent link
Ian Wark (7812944) | answered Oct 21 '19, 11:21 p.m.
I am not aware of best practice around the reuse of attachments. There is no mention in this article about work item best practices: https://jazz.net/library/article/760

If you are not concerned about the size of having multiple attachments that are the same, my 2 cents would be to attach in every work item that needs that information. That way if another work item were to be deleted or that attachment lost it wouldn't impact on all work items referencing it.

If you are concerned about the size of (non-SCM) attachments and the database slowdown that may take place, I suggest looking at these links. Some have suggested to add files to a file server and create Related Artifact links to them instead of attaching directly, but the UI is not so helpful.

Your answer


Register or to post your answer.