Partajați prin


Functional work item search

TFS 2017

Functional work item search command filters extend your ability to refine your search of work items based on assignment, work item type, specific fields, and more. This is in addition to the filter functions documented in Get started with search. Work item search is a built-in feature available to all Azure DevOps users.

By using Work Item Search, you can do the following tasks and more.

Search task Description
Search over all your projects Search in your own and your partner teams' backlog. Use cross-project searches over all the work items to search across your enterprise's entire work items. Narrow your search by using project and area path filters.
Search across all work item fields Quickly and easily find relevant work items by searching across all work item fields, including custom fields. Use a full text search across all fields to efficiently locate relevant work items. The snippet view indicates where matches were found.
Search in specific fields Use the quick in-line search filters to narrow down to a list of work items in seconds. Use the filters on any work item field. The list of suggestions helps complete your search faster. For example, a search such as AssignedTo:Chris WorkItemType:Bug State:Active finds all active bugs assigned to a user named Chris.
Search across test Search across Test Plans, Test Suites, and other test work item types.
Take advantage of integration with work item tracking The Work Item Search interface integrates with familiar controls for managing your work items; letting you view, edit, comment, share, and more.

Prerequisites

  • All users can use work item search.

Search by work item ID

Enter the work item ID in the Azure DevOps title bar to quickly go to it. Searching for a work item ID opens the work item in a modal dialog, providing quick access to read and edit work items.

Opening the work item in a modal dialogue

Full text search across all fields

You can easily search across all work item fields, including custom fields, which enables more natural searches. The snippet view indicates where matches were found.

Search across all work item fields

  • Use simple search strings for words or phrases. Work item search matches derived forms of your search terms; for example, a search for "updating" also finds instances of the word "updated" and "update". Searches aren't case-sensitive.
  • When you search from inside a project, the default is to search only within that project.
  • While searching from inside a team, the default is to search only within the default area path of that team.
    • When you have one project selected, you see a list of area paths in that project for which you have read access - you won't see any projects and area paths for which you don't have read permission
    • Select area paths in the tree to narrow your search if necessary.
  • The selected projects are always at the top of the list. Notice that hit counts are also shown for projects that aren't selected.
  • Open the search results in a new browser tab from either the main search function or by selecting Ctrl + Shift + Enter.

Work item search best practices

  • Use a text search across all fields to efficiently locate relevant work items. Text search is useful when you're trying to, for example, search for all work items that had similar exception trace.
  • Use the quick in-line search filters on any work item field to narrow down to a list of work items in seconds. The list of suggestions helps complete your search faster.

Search vs. managed work item queries

You have two ways to find and list work items: managed queries and the main search function. If you're looking for a single work item, use the main search. If you want to generate a list of work items to triage, update, chart, or share with others, use a managed query.

With the main search function, you can search against a more fully indexed set of fields than that of managed queries.


Use a managed query

Search


  • List items to perform bulk updates to fields.
  • 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.
  • List work items with link relationships.
  • List work items for a single project, multiple projects, or across all projects.
  • Find a specific work item using its ID or a keyword.
  • Find one or more work items across all projects in a fast, flexible manner.
  • Perform full text search across all work item fields.
  • Review work items assigned to a specific team member.
  • Search against specific work item fields to quickly narrow down a list of work items.
  • Determine what key words will support a managed search.
  • List work items for a single project, multiple projects, or across all projects.

To get started, see the following articles:

For specific managed query examples, see Query quick reference, Example queries.

  1. Fine-tune your search by specifying the fields to search. Enter a: and a user name to search for all items assigned to that user.

    Search from the title bar

    See the following quick filters that you can use:

    • a: for Assigned to:
    • c: for Created by:
    • s: for State
    • t: for Work item type

  2. Start entering the name of a field in your work items; for example, enter ta.

    Quick filters as you enter a field name

    The dropdown list shows work item field name suggestions that match user input. These suggestions help you complete the search faster. For example, a search such as tags:Critical finds all work items tagged 'Critical'.

  3. Add more filters to further narrow your search, and use Boolean operators to combine terms if necessary. For example, a: Chris t: Bug s: Active finds all active bugs assigned to a user named Chris.

  4. Narrow your search to specific types and states, by using the drop-down selector lists at the top of the results page.

  5. Widen your search across all projects, or narrow it to specific types and states. Use the filter to show the selector lists.

    Showing the filter lists

  6. Select the criteria you want in the drop-down selector lists, or search across the entire organization.

    Selector drop-down lists

  7. Sort the results as you need using the drop-down list of field names, work item types, or by relevance.

    Sort drop-down list

Quick filters for matching in specific fields

Quick inline search filters let you refine work items in seconds. The dropdown list of suggestions helps complete your search faster. Mix and match the functions to create quick powerful searches.

Usage Example
Scope your search terms to match in any work item field including custom fields. Enter the field name followed by the search terms. tags:Critical finds work items having a field 'tags' containing the term 'Critical'.
Use multiple inline search filters to scope your search by any work item field, including custom fields. t: Bug path:"project\search" finds all bugs in the area path "project\search".
Use the operators >, >=, <, <=, =, and != for date, integer, and float fields. t: Bug CreatedDate> @Today-7 finds all bugs created in the last week.
For the search query that contains multiple terms and users looking for exact match, embed the search term inside " " BuildPath: "tools.demoproject.com" finds all work items that necessarily contain the path "tools.demoproject.com".

Quick inline search filters let you refine work items in seconds

Scope projects and area and iteration paths using filters

Filters make it easy to narrow the search to specified projects and area paths.

Narrow the search to a specific location using the proj, area, iteration, path, and comment filters:

Usage Example
Finds all occurrences of the word Wiki in the Fabrikam project. Wiki proj:Fabrikam
Finds all occurrences of the word Wiki in the area path Contoso/Mobile and its subpaths. Wiki area:Contoso/Mobile
Finds all occurrences of the word Wiki in the iteration path Contoso/Sprint101 and its subpaths. Wiki iteration:Contoso/Sprint101
Enclose the argument to the filter in double-quotes if it contains a space. Wiki path:"Contoso/Windows Phones and Devices/Services"
Finds backlog comments comment:todo

See more of the work item

You can quickly get a full screen view of the selected work item using Expand the file to fullscreen expand and Shrink the file to a window shrink in the toolbar. However, another way to see more of the work item, while you can still select work items from the list of matching results, is to hide the left column filter pane by choosing < at the top left of the column. Use > to restore the filter pane.

If you're using a portrait orientation screen, use the Preview pane: Right link at the top right of the window to display the code below the search results list.

Tip

Search remembers the state of the filter pane, configuration of the work item view pane, and its position between sessions as part of your user preferences.

Search Work Items with REST API

You can use APIs to extend or supplement the capabilities listed in this article. For information about Work Item Search with REST API, see Fetch Work Item Search Results.

Next steps