It's all about the answers!

Ask a question

How to get the dependent work items programatically through jazz API?


Sarthak Sharma (4711620) | asked Aug 03 '12, 12:30 a.m.
I want to access the the dependent work item of a 'given work item' programatically in java code. What can be the possible code for the same?

Accepted answer


permanent link
Ralph Schoon (63.5k33646) | answered Aug 03 '12, 3:20 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Aug 03 '12, 3:46 a.m.
The code for the client API should look like

        IWorkItemClient wiClient = (IWorkItemClient)teamRepository().getClientLibrary(IWorkItemClient.class);   
        IWorkItemReferences refs = wiClient.resolveWorkItemReferences(workItem, monitor);
       
        List<IReference> references = refs.getReferences(WorkItemEndPoints.DEPENDS_ON_WORK_ITEM);

I have not tested the code.

For the server API look at http://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/
or https://jazz.net/forum/questions/64268/operation-advisor-custom-precondition-for-work-items/64273
Sarthak Sharma selected this answer as the correct answer

One other answer



permanent link
Aradhya K (1.4k54345) | answered Aug 03 '12, 1:58 a.m.
JAZZ DEVELOPER
You can get linked or reference work items with the Link ID com.ibm.team.workitem.linktype.blocksworkitem.

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.