Share via


Shared queries (Scrum)

You can manage your workload more effectively by frequently identifying the product backlog items, tasks, impediments, and other work items on which you want to take action. To more easily find all such work items in a particular team project, you can run the queries that the process template for Visual Studio Scrum provides.

You can open these queries from the Work/Queries page in Team Web Access (TWA). From Team Explorer, go to the Work Items page.

Scrum shared queries

Shared queries (Scrum process template)

Quick tips

  • All valid users with standard access can create queries and folders under the My Queries area. To create queries and query folders under Shared Queries , you must have the Contribute permission set. For more information, see Set permissions on queries.

  • To find work items that are assigned to you, add @Me as the value for the Assigned To field in one of the query clauses.

  • You can modify any query by adding criteria to focus on a product area, an iteration, or another field that is defined for the types of work items that you want to find. To modify a query, open its context menu, and then choose Edit. For more information, see Query for work items.

  • You can open any query in Excel or Project, where you can modify the query and publish your changes to the database for tracking work items.

  • To visualize progress create a pie-chart, column chart, or other chart for flat-list queries.

Shared queries

Your product owner can plan and track product backlog items and bugs in the product backlog by using the Product Backlog query. You can find work items that are assigned to the current sprint by using the shared queries that are listed under the Current Sprint folder. These queries find work items that are assigned to a specified iteration or sprint. As you plan additional sprints, you can modify these queries to specify the latest sprint and save them to additional folders that you create, such as Sprint 2 or Sprint 3.

The project administrator for each team project defines area and iteration paths for that project so that the team can track progress by those designations.

Shared queries

Description

Product Backlog

Lists all product backlog items and bugs that are assigned to the root iteration. Product backlog items and bugs are sorted by backlog priority.

Blocked Tasks

Lists all tasks in the current sprint that have been marked as Blocked.

Open Impediments

Lists all open impediment work items in the current sprint.

Sprint Backlog

Lists all product backlog items, bugs, and their linked tasks that your team has committed to complete in the current sprint.

Test Cases

Lists all test cases in the current sprint and sorts them by priority.

Unfinished Work

Lists all product backlog items, bugs, and their linked tasks that have not been marked as Done in the current sprint.

Work in Progress

Lists all tasks in the current sprint that are marked as In Progress.

Q & A

Q: What query operators and variables can I use?

A: The operators and variables available for selection depend on the field that you select. The four variables are @Project for the project name field, @Me for person-name fields, @Today for date-time fields, and [Any]. See Query fields, operators, values, and variables.

Q: How do I automatically update queries based on the current sprint or iteration?

A: There’s no automatic way to do this; you must manually update queries to point to the current sprint. If your team project is based on Scrum or Agile, you’ll find a set of queries under the Current Sprint or Current Iteration folders. For each query to return items defined for the current sprint, you must update the iteration path to the iteration that is current according to the date.

You can change many of your queries by saving them as .wiq files. Open the query in Team Explorer, choose Edit Query, and then choose File, Save As to save each query as a .wiq file. Here is an example of the Work in Progress query that has been updated to support Release 2\Sprint 59.

<?xml version="1.0" encoding="utf-8"?>
<WorkItemQuery Version="1">
  <Wiql>
    SELECT [System.Id],
           [System.WorkItemType],
           [System.Title],
           [System.AssignedTo],
           [System.State],
           [Microsoft.VSTS.Scheduling.RemainingWork],
    FROM WorkItems 
      WHERE [System.TeamProject] = @project and 
            [System.IterationPath] under 'FabrikamPrime\Release 2\Sprint 59' and 
            [System.WorkItemType] in group 'Microsoft.TaskCategory' and 
            [System.State] = 'In Progress' 
      ORDER BY [System.AssignedTo],
               [Microsoft.VSTS.Common.BacklogPriority],
               [System.Id] 
   </Wiql>
</WorkItemQuery>

Q: How should multiple teams work with queries?

A: Each team should consider creating a team folder under the Shared Queries area and providing contributor permissions to the team members. To learn more, see Set permissions on queries.

See Also

Concepts

Visualize progress (work item charting)

Create Excel reports from a work item query