I'm setting up ADO for my team and trying to write some queries, and I'd like to write one to show me anything that is in a New or Active state but where all the children are closed.
I have set the setting to close parents if the children go active, but I'm just trying to clean up the backlog they currently have and figured this would be a query for a good sanity check every once in a while.
I've tried fooling around with the query editor a bunch. Currently trying
Query type: Work items and direct links
Top:
- Work Item Type = [Any]
- And State in New, Active
Filter:
- Work Item Type = [Any]
- And State in New, Active
Filter option:
- Only items that do not have matching links
- Return selected link types - Child
I'm setting up ADO for my team and trying to write some queries, and I'd like to write one to show me anything that is in a New or Active state but where all the children are closed.
I have set the setting to close parents if the children go active, but I'm just trying to clean up the backlog they currently have and figured this would be a query for a good sanity check every once in a while.
I've tried fooling around with the query editor a bunch. Currently trying
Query type: Work items and direct links
Top:
- Work Item Type = [Any]
- And State in New, Active
Filter:
- Work Item Type = [Any]
- And State in New, Active
Filter option:
- Only items that do not have matching links
- Return selected link types - Child
1 Answer
Reset to default 0Azure DevOps can not query and compare/analyze received data. As a workaround, you may query:
Top:
Work Item Type = [Any]
And State in New, Active
Filter:
Work Item Type = [Any]
And State <> Closed
Filter option:
Only items that do not have matching links
Return selected link types - Child
In this case, you'll receive work items without child links or with all closed child work items. Additionally, you may add to the Top Related Link Count > 0
to exclude work items without links.