TFS 2013: Get all work items below a certain parent
Asked Answered
Z

4

27

how can I define a query in TFS 2013 (Team Explorer 2013) to get all items as a list below a certain toplevel workitem:

|--+-Parent 1
   |
   |--+-Child 1
   |  |--Child of Child 1
   |
   |--+-Child 2
   |  |
   |  |--Child of Child 2
   |
   | ...

Result:

  • Child 1
  • Child of Child 1
  • Child 2
  • Child of Child 2

Is this possible?

Thanks, Konrad

Zara answered 21/5, 2014 at 11:45 Comment(1)
I made it work with Fenton's solution but selecting "Work Items and Direct Links", not "Tree of work items"Confessional
B
33

Step 1 - Select "Tree of work items"

Step 2 - Set up the query as usual for the top level work items, for example only "Epic" work items with id 4247 (whatever you like really).

Step 3 - Under "Filters for linked work items" you can exclude descendent items, for example you could show only PBIs, or only bugs etc.

Example Query

Brownnose answered 13/9, 2016 at 10:32 Comment(0)
I
2

Yes, use a "Tree of Work Items" type of query.

Innovation answered 21/5, 2014 at 13:48 Comment(2)
If I use the tree, I couldn't filter out some childs I don't want (e.g. of a certain type like "Feature") ... I need it in a pure list, to get the total count of items.Zara
@Zara Can't you limit type with that Work Item Type that's displayed in the answer from @Fenton?Mitchellmitchem
F
2

Konrad,

The most simple way to learn how build this querys is: on backlog turn on features, user story and task, I know you want features, then click create a query, give a name. That query show you how to build one with tree and WIT's with same type like sub-query, for example.

After you do this, tell us what you want to refine.

Fugacity answered 22/5, 2014 at 20:9 Comment(3)
I created about 100s of queries with tfs the last years. so let me clearify this: I've a topmost item (feature) and under this many tasks and bugs and other features with task and bugs under and so on. ... If I use the tree view query, i get a well formed tree with all 3 WIT in a structure. But I only need the tasks and the bugs ... so I want to "filter out" all feature WITs but without loosing the tasks and bugs on the 2nd, 3rd, ... level under the topmost feature. Why? Because I want the correct number of tasks/bugs as the count without the structuring feature work items.Zara
You need the tasks and bugs items that are children of a feature is on the second level, or children of a feature, but do not want to appear a feature, is it?Fugacity
Yes, that's right. All tasks and bugs on all levels below the top feature - but not the features itself on the way down the tree.Zara
P
1

Sad story is that you can't make charts for this type of query, for exapmle to see % of bugs/tasks completed

Prohibitionist answered 22/12, 2022 at 7:39 Comment(1)
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From ReviewEisenhower

© 2022 - 2024 — McMap. All rights reserved.