It's all about the answers!

Ask a question

How to from either command line or the rest API to traverse and found all parents of a work item

nannette Mori (50468) | asked Aug 21 '15, 11:50 a.m.

I need to find all parents of a work item.  How can I accomplish this using either command line or the rest API

Thank You!

2 answers

permanent link
Ralph Schoon (62.9k33645) | answered Aug 21 '15, 4:16 p.m.
There can only be one parent. See

nannette Mori commented Aug 21 '15, 4:32 p.m.

I guess I was not clear I need to traverse the tree of parents

example:  I have a story, from the story I want to know what the Feature is, and from the feature I want to know what the epic was

permanent link
Donald Nong (14.5k414) | answered Aug 23 '15, 11:38 p.m.
edited Aug 23 '15, 11:40 p.m.
If you are using OSLC API, namely, accessing the work item via the URL such as /ccm/resource/itemName/, you can find the parent work item in two places within the response body.
1. In the <Description> itself.
    < rdf:resource="https://clm:9443/ccm/resource/itemName/" />
2. In a separete "node".
      <rdf:Description rdf:nodeID="A4">
        <rdf:subject rdf:resource="https://clm:9443/ccm/resource/itemName/"/>
        <rdf:predicate rdf:resource=""/>
        <rdf:object rdf:resource="https://clm:9443/ccm/resource/itemName/"/>
        <rdf:type rdf:resource=""/>
        <dcterms:title>43: Implement - Requests sent in form of email</dcterms:title>

If you are using the reportable REST API, you can query the parent directly using the URL such as
You can even get the grandparent, great-grandparent in the same query if you so desire

Your answer

Register or to post your answer.