Create managed queries to list, update, or chart work items
VSTS | TFS 2018 | TFS 2017 | TFS 2015 | TFS 2013
With queries, you can perform these functions:
- List items to perform bulk updates, assign or reassign
- Review work that's in progress or recently closed
- Triage work (set priority, review, update)
- Create a chart and add it to a dashboard
- Create a chart to get a count of items or sum a field
- Create a chart that shows a burndown or burnup over time
- View a tree of parent-child related work items
For the mechanics of constructing and saving queries, see Use the query editor to list and manage queries. For specific examples, click one of the following links.
If you are looking for a specific work item, use the adhoc search box. If you want to generate a list of work items to triage, update, chart, or share with others, then use a managed query.
- View and run a query
- Perform an adhoc search
- Query editor
- Query operators & macros
- Organize and run managed queries
Additional tips for working with 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.
- 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.
- You can modify any query by adding criteria to focus on a product area, an iteration, or another field. To modify a query, open the query editor.
- You can open any query in Excel or Project, where you can update the fields of one or more work items and publish your changes to the database for tracking work items.
- You can visualize status or progress by creating a pie-chart, column chart, or trend chart for flat-list queries.
You can list work items based on the following criteria...
other account-specific fields
Keywords or phrases
|Work item counts
and numeric fields
|- Active items assigned to me
- Closed items that were assigned to me
- Active items assigned to my team
- Items I've modified in the last 30 days
- Items I closed
- Items I resolved in the last week
|- Items containing a keyword/phrase
- Items not containing a keyword/phrase
- Items with an undefined field
- Items that belong to a category
|- Count of active bugs per developer
- Count of bugs by area and states
- Sum of story points and their status
- Burnup chart of user stories for a sprint
- Sum of remaining work per developer
Get started with queries
To add a custom field to support your query needs, see Customize your work tracking experience.
To learn about query charts and widgets, see these topics:
Query within or across team projects
By default, you query within a single team project. However, using the query editor, you can query across team projects.
Visualize related work and other objects
You can view related work items and object within a work item form by installing the Work item visualization extension available from the Visual Studio Marketplace.