It's all about the answers!

Ask a question

How to set parent link when creating a work item by OSLC?


Eric Jodet (6.3k5111120) | asked Jun 08 '12, 9:01 a.m.
JAZZ DEVELOPER
I wants to know how to set parent link when creating a work item by OSLC.
I found the following documents:
https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2
https://jazz.net/library/article/352

There are some explanation in those documents how to create a work item by OSLC,
however, how to set parent link on work item creation is not mentioned.

May you please help?

Accepted answer


permanent link
Eric Jodet (6.3k5111120) | answered Jun 08 '12, 9:02 a.m.
JAZZ DEVELOPER
edited Jun 08 '12, 9:04 a.m.
Refer to this page
for such example.
Spencer Murata selected this answer as the correct answer

One other answer



permanent link
Shasi kumar (112) | answered Jun 05 '17, 3:40 a.m.

Hi Eric,

There are different types of links which could be used (Set Parent, Add children, Add Blocks etc., are some examples)
Here is an example of how to add a parent link to a work item using JSON. You could POST the following JSON request to use "Set Parent" link of a work item

{

  "rtc_cm:com.ibm.team.workitem.linktype.parentworkitem.parent": {
    "rdf:resource": "<RTC_URL>/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/<Parent_WorkIem_ID>"
  }

}

Similarly for a "Blocked By" link the following request could be used

    {
      "rtc_cm:com.ibm.team.workitem.linktype.blocksworkitem.blocks": {
        "rdf:resource": "<RTC_URL>/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/<Blocking_WorkItem_ID>"
      }
    }
        

We could determine which JSON object to use for the request based on the resource shape of a work item from the resource catalog.

Hope this helps. Thanks!!

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.