Create a "Contributes To" link reference in CR workitem Programmatically.
![]() How can I programmatically create a "Contributes To" link reference in CR workitem for each value configured in the "affected app workitem" attribute within CR. "Affected App WorkItem" is a custom attribute within CR which is of type workitem list. So I have created a follow up action sever side plugin. But I am unable to get the values of the custom attribute.
if (sourceworkItem.getWorkItemType().equalsIgnoreCase(
"com.ibm.team.workitem.ChangeRequest")) { IAttribute attribute = null; List<IAttributeHandle> attributesHandles = new ArrayList<IAttributeHandle>(); attributesHandles = sourceworkItem.getCustomAttributes(); Iterator<IAttributeHandle> attributesHandlesIterator = attributesHandles .iterator(); if (attributesHandlesIterator != null) { while (attributesHandlesIterator.hasNext()) { IAttributeHandle currentAttributeHandle = attributesHandlesIterator .next(); IRepositoryItemService itemService = getService(IRepositoryItemService.class); IAttribute currentAttribute = (IAttribute) itemService .fetchItem(currentAttributeHandle, IRepositoryItemService.COMPLETE); String currentAttributeID = currentAttribute .getIdentifier(); if (currentAttributeID .equalsIgnoreCase("affected_work_items")) { attribute = currentAttribute; break; } } |
2 answers
![]()
Ralph Schoon (63.3k●3●36●46)
| answered Mar 07, 3:20 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Mar 07, 3:22 a.m. See https://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/ for how to find an attribute using its ID. Also see https://rsjazz.wordpress.com/2013/01/02/working-with-work-item-attributes/ |
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.