It's all about the answers!

Ask a question

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


Vignesh ramamoorthy Muniyandy (15310) | asked Nov 13 '17, 9:18 p.m.

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,

One answer



permanent link
Ralph Schoon (63.2k33646) | answered Nov 14 '17, 3:52 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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.


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.