It's all about the answers!

Ask a question

Work Item Query Showing Parent/Child Relationships


Jon Lacks (11) | asked Jan 29 '10, 11:59 a.m.
edited Feb 19 '13, 5:27 p.m. by Susan Lafera (11)
We would like to run a work item query which outputs all story type work item for a given iteration along with their associated child task work items. We want the query to display this relationship e.g.

Story 1
Task
Task
Task
Story 2
Task
Task
Task

etc.

12 answers



permanent link
Harry Koehnemann (30125238) | answered Jul 28 '11, 9:31 p.m.
In 3.0.0 it was a "Parent" column with work item ID fields - "#12", "#76", etc. Probably the same in 3.0.1, but you should check.

Here's part of an import I did for a customer. Note RTC generates new IDs (if we tell it to), but uses the Id column in our import for establishing relationships - pretty cool.

Type Id Parent
Plan Item 77
Story 78 #77
Task 79 #78


The best way to find the syntax for RTC imports is to perform an export and see what RTC generates. Another trick for that export is to create the query in the Web UI with the attributes you are interested in. In my experience, the Web UI query has more attributes listed than the Eclipse UI and the Work Item export options.

Enjoy...

permanent link
Constance Martin-Wilson (925) | answered Oct 30 '12, 1:06 p.m.
edited Oct 30 '12, 1:08 p.m.
The trick to getting with one query all of your child tickets to show up for a parent ticket is the following...

When you create your query...
In the conditions area, pick the condition Parent, your not done though, expand the twistie and look for ID. Click ID.
When you select ID you will see your condition as "Parent>ID is".
Without that, you will not see the full parent child tickets apparent.

Before that I had used in the conditions area, ID, with the parent ID named. That did not give me the full list of child tickets. It stops in the web browser, and gave me only the parent ticket in the Rich client.

I never look beneath a single field item to see what is under the twistie.  Who knew it did that. And help, never said anything about how to show parent child relationships in a single query.

This will improve my productivity 3 fold. Yeah!

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.