Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In TFS (MSF Agile), How do I query for Active User Stories with all child tasks closed?

I'm currently writing a series of "Sanity Check" queries for our MSF Agile based project on TFS 2010.
The search I'm struggling with is the following:
Find all User Stories which:
- Have child tasks (or bugs)
- All child tasks/bugs are in the Closed state
- The parent User Story is not closed

The goal being to find user stories that should/could be closed but are not yet.

There doesn't seem to be a way to get the count of child tasks, if I could do that then I could search for "has child tasks, and no child task is not closed". But perhaps there is another way to get the end result I am after ?

Update: More information
My closest search to this so far is:
Team Project = @Project
And Work Item Type = User Story
And State <> Closed
and linked items that match the query below
State <> Closed
Linking Filter: Only return items that do not have the specified links

This almost gets me what I want, however it returns user stories which have no tasks attached, I do not want those to be included.

like image 320
Zaph Avatar asked Nov 14 '11 00:11

Zaph


People also ask

How do I find a user story in TFS?

Alternatively, select the team project that you want, right click Work Items and select "New Query". The default query is anything in the project, so change the WI type to User Story, click run and you should get a list of all user stories.


1 Answers

First you need to change the type of query to be "work items and Direct Links"

In the first query type the following:

Field ------> Work Item Type

Operator---> =

Value -----> User Story

In the second criteria table which is the child of work items, choose all criteria you need

Edited

See the following image

enter image description here

like image 173
Mohamed.Radwan -MVP Avatar answered Oct 21 '22 11:10

Mohamed.Radwan -MVP