0

Anyone know how to write a query in TFS that will show any Features whose State is not 'DONE' but whose child User Stories or similar are 'DONE'?

jessehouwing
  • 106,458
  • 22
  • 256
  • 341

2 Answers2

0

There is no default way to get Features not 'Done' but all child User Stories are 'Done' from a Query. You would achieve your requirement by using REST API to get parent/child work items from Wiql, and then check state for all child work items:

Or you can create a Tree of work items to return all Parent not 'Done', and then export the query to CSV to filter the Child manually:

enter image description here

Cece Dong - MSFT
  • 29,631
  • 1
  • 24
  • 39
0

Of course this can be done. It's similar to what I've done here.

Basically search for

Query Type: Work Items and Direct Links

Top level:
Work Item Type: Feature
State: <> Done

Child level:
Work Item Type: in(Bug, User Story)
State: <> Done

x Only show work items that don't have the specified link

Link types [Parent Child]
jessehouwing
  • 106,458
  • 22
  • 256
  • 341
  • Your example will filter User Stories that contain one or more closed child's. But if you want to find User Stories only with all closed child's , there is no way to filter out them. – Shamrai Aleksander Mar 12 '20 at 11:28
  • @ShamraiAleksander No it filters Features that have no childern in another state than done. The "Only show items that don't have the specified link" does that. – jessehouwing Mar 12 '20 at 12:02
  • yes, you are right, that will work. However, your example`ll also return Features without any child work item because they also do not have (Bug, User Story) & State: <> Done )) – Shamrai Aleksander Mar 12 '20 at 12:39