How to: Get referenced defect?
Hello,
I'm trying to check state of referenced work item during Save operation. I use following code: List<IReference> wir = iwr.getReferences(epdl.get(i)); for(int j=0;j<wir.size();j++) { System.out.println("looping thru references"); // if this is to an item.. should always be if(wir.get(j).isItemReference()) { // get the item, and it SHOULD always be a workitem IWorkItem r = iac.resolveAuditable((IWorkItemHandle)wir.get(j).resolve(),IWorkItem.FULL_PROFILE, null); It works OK when referenced work item type is story or task. But if it is defect wir.get(j).isItemReference() returns false. Should I use wir.get(j).isURIReference() ? How could I resolve this link to IWorkItem? -thanks in advance |
One answer
Ralph Schoon (63.6k●3●36●46)
| answered Oct 16 '12, 7:24 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi timur,
have you looked at the examples here: https://rsjazz.wordpress.com/2012/09/20/the-rtc-workitem-server-link-api-linking-to-work-items-and-other-elements/ and here: https://rsjazz.wordpress.com/2012/09/19/the-rtc-workitem-link-api-linking-workitems-to-other-elements/ ? If the reference is no item reference, it is probably a CLM link, for example a change set or a test case etc. that is referenced by URI. |
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.