It's all about the answers!

Ask a question

Is there a way to display attachments within the description


Garry Sager (033) | asked Mar 31 '11, 5:58 p.m.
We were currently keeping our stories on a wiki and within them we include images that show what a feature we are adding will look like. I currently add these images as attachments but would like to display the image within the description like we could on a wiki.

Accepted answer


permanent link
Ricardo Herrera (263) | answered Jun 02 '20, 4:33 p.m.
edited Jun 02 '20, 4:35 p.m.

Once the attachment is uploaded, it gets a numeric id from ccm. You can reference it then in the description by simple writting attachment followed by the given id (e.g attachment 312887) and that's it, ccm will change it to a link (e.g attachment 312887) and when the user hovers it, the image will be displayed in a popup window.

Ralph Schoon selected this answer as the correct answer

2 other answers



permanent link
Erik anderson (38315029) | answered Sep 08 '11, 12:15 p.m.
I'm interested in this too. Any plans to offer this capability in a future release?

permanent link
Kristina Florea (3323) | answered Feb 16 '12, 6:13 a.m.
Hi,

here a (rudimentary) way to show attachments on your wi editor:

1. create a calculated value based on a script that returns the url of your attachment. Something like:
dojo.provide("org.example.workitems.providers.ShowPicture");

dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");


(function() {
var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes;

dojo.declare("org.example.workitems.providers.ShowPicture", null, {

getValue: function(attributeId, workItem, configuration) {


return "{{https://com.ibm.jazz.rtc.server:9443/ccm/service/com.ibm.team.workitem.common.internal.rest.IAttachmentRestService/itemName/com.ibm.team.workitem.Attachment/3|AttachmentImage}}";

}
});
})();

2. Create a custom attribute of Type Wiki based on the calculated value above

3. add the presentation on the editor

3. Synchronize attributes

Have fun.
You can add some logic in your script (change image based on status, etc.)
Enhance and share :-)

Don't forget to Enable Process Attachments Scripts in the Advanced Properties in ccm/admin (default is false - disabled)

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.