VSTS Query of Work Items assigned to a team -- teams identified by Area Paths

2k views Asked by At

In our VSTS setup we have a single backlog with multiple teams. The teams are defined by assigning various Area Paths to each Team.

In our main project under Settings > Work > Areas, each Area Path is assigned to a team. Each area represents a client, and clients are assigned teams, but there is nothing about the text or sequence etc from which you can determine a team.

From main VSTS page, when I select the team from the upper-left drop-down selection and then go to Work and Backlogs, all of that looks correct and I only see the work items for the specified team. So I know that part is configured correctly.

When I build a query, I get all items on the backlog. What I want is to add to the query "Team = X" and have it pull all the work items based on the AreaPath:Team assignment. If I later change those area/team assignments and then rerun the query, it should reflect that change with no change to the query.

In the query builder I see a field called "Team Assignment" (the obvious choice...) and it even populates my team names in the drop down, but this field is not populated for any work item. I confirmed by eliminating this field and just adding it as a column to the results grid - there is no data.

This seems like something lots of people would need, but I haven't had luck finding any documentation on it. I don't want to create a custom field for Team Name (unless there is someway to have VSTS maintain it for me automatically).

Currently we are just tagging every story with a team name, but this is double-work and cluttering up our tag list.

We are using the Scrum template.

4

There are 4 answers

1
Luca Cappa On BEST ANSWER

Assuming all the work items are already assigned to some member of those teams, I would create a query leveraging the In Group operator: in order to list all the work items belonging to a Team you could just create a query like this one:

filtering work item in group

Remember that any Team is a Group indeed: a team called "Developers" inside team project called "Suite" is referenced as the group "[Suite]\Developers"

3
jessehouwing On

This is indeed a much requested feature, but there is currently no field you can easily use to filter a query automatically.

There is a Create Query button on the backlog though, it will automatically create a query with the correct filters.

enter image description here

There is no field called "Team Assignment", are you referring to "Assigned To"? That field only filters to work items Assigned to (field on the work item) user or group. But being inside any Team's Area doesn't assign the work item through the field.

0
starian chen-MSFT On

As jessehouwing said that there is no field that you can used to filter work items for team. I submit a user voice: VSTS query work items of team, you can vote it.

The workaround is as you said that by tag or as Luca said that by using Assigned To In Group [team group]

2
MrHinsh - Martin Hinshelwood On

As long as your Team in Area Path is the leaf node there is an easy way to achieve this.

You can add the "Node Name" field to any Query and use it to both show and filter by the Team Name.

Node Name is always updated with the Leaf node of the Area Path that is set for a Work Item. In the happy path that's the same as Team, but your millage may differ.

For example if your Area Path is "MyPtoject\Team A" or "MyPtoject\ProductA\Team A" then Node Name will be populated correctly. However if you have "MyPtoject\Team A\Product A" then it will not be.

but Martin I use area path for something else

If you use Area Path for another hierarchical thing within your org then you can use Team Field for Team: https://nkdagility.com/team-foundation-server-2012-teams-without-areas/

Or, and easyer approach is to move that Client list into a field and use Area Path for Team.