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

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

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?

1 vote


Accepted answer

Permanent link
Refer to this page
for such example.
Spencer Murata selected this answer as the correct answer

1 vote


One other answer

Permanent link

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!!

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
× 12,019

Question asked: Jun 08 '12, 9:01 a.m.

Question was seen: 4,394 times

Last updated: Jun 05 '17, 3:40 a.m.

Confirmation Cancel Confirm