Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Is there a way to display attachments within the description

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.

0 votes


Accepted answer

Permanent link

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

0 votes


2 other answers

Permanent link
I'm interested in this too. Any plans to offer this capability in a future release?

0 votes


Permanent link
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)

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Mar 31 '11, 5:58 p.m.

Question was seen: 5,767 times

Last updated: Jun 02 '20, 4:35 p.m.

Confirmation Cancel Confirm