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

How to fetch work item parent?

Hi,

i have developed the java client code for fetching all available work items. Its working fine.

i am having one doubt on this.

How to fetch work item parent to the each work item.


Thanks

Pugazh

0 votes



One answer

Permanent link
Given a workitem, you would search its references for 'Parent' links,
and use the handle of the workitem on the other end of the parent link.

here is how I do it for Dependancies.. (in an OperationAdvisor)

IWorkItemReferences iwr = ((ISaveParameter) data).getNewReferences();
// and only the depends on links
List<IReference> wir = iwr.getReferences(WorkItemEndPoints.DEPENDS_ON_WORK_ITEM);
// loop thru the workitems this one depends on
for(int j=0;wir!=null && j<wir.size();j++)
{
if(Debug) 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);

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,927

Question asked: Apr 30 '12, 1:16 a.m.

Question was seen: 5,307 times

Last updated: Apr 30 '12, 1:16 a.m.

Confirmation Cancel Confirm