Reputation: 9034
In TFS query builder
, I need a query to get all PBIs that ALL of its child tasks are in done state.
for example :
PBI : User Story 1
- Task 1 (Done)
- Task 2 (Done)
- Task 3 (Done)
PBI : User Story 2
- Task 1 (Done)
- Task 2 (Done)
- Task 3 (In Progress)
In above example, the desired query should only returns User Story 1
Upvotes: 2
Views: 5761
Reputation: 23434
You should create a "Work Item and Direct Links" query.
In the top query select:
"Work Item Type = Product Backlog Items" & "State In Committed, Done"
In the bottom query select:
"Work Item Type = Task" & "State <> Done"
In the radio buttons on the left select:
"only top level items that do not have the link."
Should suit but there are two assumptions:
Upvotes: 5
Reputation: 77
Type == "Product Backlog Item"
Total number of Child Tasks > 0
Number of Child Tasks WHERE (task.State == "Done") == Total number of Child Tasks
Upvotes: -2