Track your work by using managed queries in Azure Boards
Raksts
Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019
List bugs, user stories, or other work items based on field criteria you specify using queries. You can then review these lists with your team, triage work, or bulk update work items. Along with managed queries, the semantic search tool provides some overlapping and different functionality worth exploring.
Use managed queries to support these operations:
Bulk update of work items using the web portal
Triage and update work items
Review a hierarchy of work items
Share a list of work items with a team member
You can create queries and query folders from the web portal or from Visual Studio Team Explorer. Changes you make in one client are reflected in other clients as all changes are stored in the work tracking data store.
To find work items that are assigned to you, add the @Me macros 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, 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. You can also 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.
Query capabilities
The following sections provide an overview of the functions supported to define and manage work item queries.
Query filters are defined through the Query Editor.
Query macros can be selected for specific fields to create a query clause.
Query results and query management features are capabilities available through the Query Results page.
Query filters
The following table summarizes the query filter functions supported by each Azure DevOps version.
Piezīme
Managed queries don't support proximity searches, however semantic searches do. In addition, semantic searches support both * and ? as wildcard characters and you can use more than one wildcard character to match more than one character. For more information, see Functional work items search.
Find work items based on a field match with a previous value.
Supported operator: Was Ever
Find work items based on a value defined on a specific date.
Supported operator: ASOF (WIQL syntax)
Find work items in one or more projects in an organization or collection. Default is the current project. Use the Team Project field to query on two or more projects.
Find work whose field value matches any value in a delimited set, such as a set of work item types, workflow states, or picklist values. Separate values with the list separator that corresponds to the regional settings that are defined for your client computer. For example, you might use a comma (,).
Filter query results based on a key word or select fields.
All versions
To bulk move, copy, or paste query clauses, install and use the WIQL editor.
Supported macros
The following table summarizes the query macros or variables supported by the Azure DevOps versions. You can use some of these macros to filter notifications.
Piezīme
You can use certain macros from the web portal only. These include the @CurrentIteration, @CurrentIteration +/- n, @Follows, @MyRecentActivity, @RecentMentions, @RecentProjectActivity, and @TeamAreas macros. These macros aren't supported when exporting a query to Excel, notification filters, or exercised from Team Explorer, or REST APIs.
Find work where the selected date-time field is within the current day, month, week, or year with a plus/minus offset, example: Closed Date>=@StartOfDay-7.
Work item queries only support querying of work items and work items linked to other work items. Here are a few of the tasks that managed queries don't support:
Views showing linked objects such as builds, releases, code, or other non-work item objects.
List work items linked from one project to another.
Export a cross-project query to Excel. Direct links queries export to Excel as a flat-list.
Query types (flat, direct links, tree)
Azure Boards supports three query types. The icon next to each query indicates the query type. Use the following guidance to choose the query type based on what you want to accomplish with the query.
Query type
Usage guidance
Flat list of work items
List items to do bulk updates to fields
Triage a list of work items
Create a query chart and add it to a dashboard
Create a chart to get a count of items or sum a field
Export a list of items to Excel to update fields
Work items and direct links
List items that are dependent on other work items
Find items related or dependent on other work items
List linked work items to do bulk updates to fields
Triage a list of linked work items
List test-related linked work items
Find orphaned backlog items, work items that have no parent
Piezīme
Work items and direct links queries export to Excel as a flat list. Direct links queries are imported as a flat list as modifying multiple types of links isn't a supported feature in Excel.
Tree of work items
List a tree of Parent-Child related work items, or other tree-topology link type
Triage a hierarchical list of work items
Export a hierarchical list of items to Excel to update fields or modify the hierarchy
Only you can view and run queries that you save under My Queries with the queries directory. Also, you can favorite one of these queries to have it appear within your query selector.
Queries you and others save under Shared Queries can be viewed by everyone with access to the project. Shared queries can be organized within folders and favorited by you or for a team. Also, you can set permissions on the folders and queries to prevent others from moving or editing them.
You can quickly create pie, bar, pivot, and trend charts from a flat-list query. Queries must be flat-list and return 1000 or less work items. You can add your query charts to a dashboard, retitle, and reconfigure them.
Query-based widgets provide support for presenting query information on a dashboard. For example, the number of active bugs or a list of work items that you can interact with. To learn about query charts and widgets, see these articles:
You may notice and wonder why the contents of the taskboard differ from the contents listed with its created query? For more information, see taskboard items versus query list items.
Full-text search queries and collation settings
To support full-text search queries, the collation settings of the SQL Server database should correspond to a language that has a word breaker registered with SQL Server. If you use an unsupported language, you could receive unexpected results when you run a work item query that specifies the Contains or Contains Words operators with text strings.
Pievienojieties meetup sērijai, lai kopā ar citiem izstrādātājiem un ekspertiem izveidotu mērogojamus AI risinājumus, kuru pamatā ir reālas lietošanas gadījumi.
Learn how to use queries and perform tasks like define a flat-list, clause, or hyperlink, and use a tree, direct link, hyperlink, or logical expression. Also learn how to query across or within projects and view results in a dashboard, and best practices.