It's all about the answers!

Ask a question

How to set the filiation of two workitems by programming?


DAVID GUO (35414) | asked Jun 07 '10, 11:04 p.m.
Assume there are two workitems:One workitem ID is 100,the other ID is 102.

I want set the one(ID:100) workitem is another's(ID:102) parent.

How to get it by programming?

Thanks a lot.

One answer



permanent link
Michele Pegoraro (1.8k14119103) | answered Jun 08 '10, 3:30 a.m.
Hi,
you have to use the ILinkServiceLibrary.createLink methods, referring the link type id (which is "com.ibm.team.workitem.linktype.parentworkitem"), and the two workitem IReference (obtained by IReferenceFactory.createReferenceToItem method, whit IReferenceFactory obtained by ILinkServiceLibrary.referenceFactory() ).

After you have create the link you have to save it using ILinkServiceLibrary.saveLink method.

Best regards,
Michele.

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.