It's all about the answers!

Ask a question

Link Parent WorkItem to Child Workitem using Parent WorkItem ID

Sudipto Sarkar (631143) | asked Aug 13 '15, 5:11 a.m.

I have a parent workitem id. I am trying to create child workitem and also link parent workitem using plain java client.
I know how to create a workitem but i am not getting how to link parent workitem programmatically

Accepted answer

permanent link
Arne Bister (2.6k12832) | answered Aug 13 '15, 7:54 a.m.

please check out the articles in Ralph Schoons blog:

They have all the code examples you need to achieve this.

If this answer is helpful please mark it accepted.

Sudipto Sarkar selected this answer as the correct answer

Sudipto Sarkar commented Aug 17 '15, 5:19 a.m.


 Thanks, it was useful. But I am stuck at pne point. How to get the IWorkitem object using the id of the workitem.
My workitem id is : 45544. How to get its corresposnding IWorkitem obj.

Arne Bister commented Aug 17 '15, 11:06 a.m.


to find work items by id or other parameter simply use work item query programmatically. Links (to e.g. Ralph Schoon's blog) and code snippets amply shared like in this post:

Probably best to write a utility method such as getWorkItemById(String myId) that uses the query concept.

Please post a new question if you need anything in particular.

Your answer

Register or to post your answer.