Work Item Query Showing Parent/Child Relationships
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
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... |
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
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.