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

RTC Java API - add value to custom attribute of type 'WorkItem List'

Hi,
   Using rtc plain java api. I am creating an automation tool where, I need to add a value to a custom attribute
of type 'Work Item list'.
Is it possible to save the attribute via

workItem.setValue(iAttribute, value);

or need to create a reference using

          final ILink newLink = linkManager.createLink(WorkItemLinkTypes.RELATED_WORK_ITEM, workItemRef, relatedRef);
 
Or is there any other way.

Kindly suggest me how to do.


Best Regards,

0 votes



One answer

Permanent link

See https://rsjazz.wordpress.com/2013/01/02/working-with-work-item-attributes/ section List Attributes.
That shows that you get a List<Object> where the Object is the type of the attribute. The same way you create a List variable and pass the list to setValue().  You can see various examples for this in the code available at https://rsjazz.wordpress.com/2017/03/29/the-work-item-command-line-is-now-open-source/ as well.


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
× 169
× 92

Question asked: Nov 13 '17, 9:18 p.m.

Question was seen: 5,689 times

Last updated: Nov 14 '17, 3:52 a.m.

Confirmation Cancel Confirm