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

Getting list of attachments into 'item list' attribute

Hi,

I wish to populate a list of attachments of a workitem in a checkbox/radio button style so that users can select one or more attachments.

So I'm going to use an 'Item list' but the items you can add to this list only include project area/team area/category etc. How would I add my own custom item (i.e 'Attachment') so that it shows on this list.

Also, please feel free to tell me I'm going about this the wrong way!

Thanks,

Henry

0 votes



4 answers

Permanent link
Henry,

I think the editor presentations you would like are not able to handle attachments. I don't think you can create a new attribute of type attachment either. The checkbox would be impractical if the number of attachments grow.

You could however try to add your own attribute representation: https://jazz.net/wiki/bin/view/Main/ContributingAttributePresentationsV2

0 votes


Permanent link
Hi Ralph,

I wouldn't actually need it to be of type 'attachment,' just of string type as I was planning on populating this list separately (through another plugin I'm doing) so really they just need to REPRESENT the attachments.

I've looked at your suggestion though thank you but it seems very involved. I've also come across this:

https://jazz.net/wiki/bin/view/Main/DataSourceValueSetProviders

Do you think it would be easier to use this? (I have RTC v 3.0.1.1.)

Thanks

0 votes


Permanent link
Hi Henry,

if you can use the value providers, it would certainly be easier. Creating attribute presentations seems to be a lot of work (did not do it myself), especially if you have to do them for the Web and the Eclipse client as well.

The issue with the value providers however is, that very few API is actually exposed in the scripts. I don't think you can access attachments from the scripts. So it might be impossible. If you can provide them vial HTTP it might be doable.

I haven't looked if you can use the presentations available against some other extension, as I understand you are building.

Sorry, but the area is too broad to do all the interesting stuff!

0 votes


Permanent link
Hi Ralph,

Having thought about this, my ideal solution would be to use the 'HTTP Filtered Value Set Provider' and run an XPath expression on the URL https://localhost:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/${xy.value}

where 'xy' is an attribute with a read-only value equal to the work item number.

But unfortunately ${xy.value} isn't available until version 3.5 M4 and I need it to work with version 3.0.1.1.

Anyway, just wanted to let you know for future reference (and if working with more recent versions!).

Thanks for your help,

Henry

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
× 10,952

Question asked: Apr 12 '12, 6:50 a.m.

Question was seen: 4,426 times

Last updated: Apr 12 '12, 6:50 a.m.

Confirmation Cancel Confirm