Query tfs workitems where user is assigned work item or linked work item (in 'tree of work items')

StackOverflow https://stackoverflow.com/questions/7881502

  •  11-02-2021
  •  | 
  •  

Question

We are using the agile template, and have user story's with linked tasks.

Some user stories assigned to me and some tasks, for users stories, are assigned to me.

What I'm trying to get is all work items that are assigned to me, or work items where a linked work item is assigned to me in a tree of work items view (not flat list)

So right now I have:

any work item in this project and iteration (not closed\resolved, and not a bug)

AND

 any linked work items assigned to me (not closed\resolved)

But this returns user stories, where I don't have tasks assigned to me. But if I change the first part of the query to be filter out items not assigned to me the 'Tree of Work Items' is not show for where I only have tasks.

The output I would like would exclude user stories where I don't have tasks, and include users stories where I do... something like this:

User Story 1 --> team member A

---->Task 1a --> me

User Story 2 --> me

---> Task 2a --> team member B

Any ideas what the query would be?

Thanks

Was it helpful?

Solution

What you want is not possible in one single query. The filter you do on the parent and on the child will be combined to an "AND" filter operation.

To get only the parents for which you have tasks, choose the query type "Work Items and Direct Links" and in the child section add a filter on "assigned to = @me" and select the option "Only return items that have specified links".

OTHER TIPS

Seems like that has been improved as of TFS 2012.

You can have a Tree of Work Items, where your linked work items are filtered according to your preferences (assigned to me, not closed, iteration etc.)

Then make sure to add "Filter options" -> Match lined work items first -> Parent/Child

That should filter any parents, not having sub tasks assigned to you and other filters you applied.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top