Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get child work items for a specific parent in TFS

Tags:

tfs

How to get child work items for a specific parent in TFS? I need a Flat List which takes a parent ID as a query parameter and returns the child work items.

Note: Till now I'm able to to do this only with the 'Work Items and Direct Links' query.

like image 889
gsbellu Avatar asked Oct 30 '22 04:10

gsbellu


1 Answers

We cannot achieve that by "Flat list of work items" query as there ins't the fields/condition to query that, we can use "Tree of work items":

  1. Select "Tree of work items"
  2. Set up the query for the top level work items, "User Story" with id 105 for example here (See below screenshot, just specify the Parent work item ID here).
  3. Under "Filters for linked work items" you can exclude descendent items, or specify the Child work item types, for example only show Task and Bug, just set Work Item Type in Task,Bug, or leave it as [Any], it will returns all the types of child work items for the specific Parent.
  4. Filter options : Match top-level work items first, Type of tree : Parent/Child

enter image description here

like image 157
Andy Li-MSFT Avatar answered Dec 21 '22 09:12

Andy Li-MSFT