It's all about the answers!

Ask a question

Link Parent WorkItem to Child Workitem using Parent WorkItem ID


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

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.6k12432) | answered Aug 13 '15, 7:54 a.m.
JAZZ DEVELOPER
Hi,

please check out the articles in Ralph Schoons blog: https://rsjazz.wordpress.com/2013/11/06/creating-clm-links-with-back-link/

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

If this answer is helpful please mark it accepted.

gg,
Arne
Sudipto Sarkar selected this answer as the correct answer

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

Hello,

 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.
JAZZ DEVELOPER

Hi,

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: https://jazz.net/forum/questions/72975/getting-work-items-through-plain-java-api

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.