Redaguoti

Bendrinti naudojant


Run a semantic work item search in Azure Boards and Azure DevOps

Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019

You can find work items by using shortcut filters or by specifying keywords or phrases. You can also use specific fields/field values, assignment or date modifications, or using Equals, Contains, and Not operators. Searching isn't case-sensitive. Use semantic searches when you want to do the following tasks:

  • 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
  • Run a 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 support a managed search

You can run a powerful semantic search from the web portal for Azure DevOps Services or for on-premises deployments when the server instance has been configured with the work item search extension.

Tip

If semantic search has been configured, you'll notice that the search box moves into the blue bar as shown in the following image.

Search Work Items Text Box

Start a semantic search for work items

With semantic search you can search:

  • Across one or more projects
  • Across all work item fields using free text
  • Against specific work item fields

Free text search easily searches across all work item fields, including custom fields, which enables more natural searches. Search results are displayed in a snippet view where the search matches found are highlighted. Semantic search also integrates with work item tracking, providing familiar controls to view, edit, comment, and share information within a work item form.

  1. Choose any Boards page, enter a keyword or phrase in the search box, and press Enter or choose the start search icon.

    Work Item Search box

  2. Search results are displayed in a snippet view where the matches found are shown in bold.

    Search results

    This search is a full text search that uses 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.

  3. Select a snippet of a work item to display it in the right window.

    Open the search results in a new browser tab from a search box by pressing Ctrl + Enter or by holding Ctrl and clicking the start search icon icon. In Google Chrome, press Ctrl + Shift + Enter to switch the focus to the new browser tab.

Choose New navigation for guidance. Previous navigation isn't supported for Azure DevOps Server 2019.

Fine-tune semantic search results

  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

    The quick filters you can use are:

    • 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, type ta.

    Quick filters as you type

    The dropdown list shows work item field name suggestions that match user input and help the user to 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.

From the web portal

Improvised search isn't available from Azure DevOps Services. Only semantic search.

Search box shortcut menu (web portal)

From Visual Studio Team Explorer

Open the Context Menu Icon context menu and select an option.

Search box menu (Team Explorer)

Finding work items using the search box (Team Explorer)

Find a work item using the search text box

You can combine shortcuts and use search operators within the search box.

Use the Search box clear icon (Team Explorer) Clear button to remove content from the search box. To switch your context to the search box from within Visual Studio, enter Ctrl+'.

Find items based on keywords or phrases

Keywords or phrases that you type into the search box return a list of work items that contain those keywords or phrases in the Description, Repro Steps, or Title fields. Enclose each phrase in quotation marks.

In the Search work items box, type a keyword or phrase that appears in the Title, Description, or Repro Steps fields for the work items of interest.

Enclose multiple words in quotation marks.

For example, to find work items with the specified keywords in the Title or Description fields:

  • For the keyword "duplication", enter duplication.
  • For the phrase "Getting Started", enter "Getting Started".
  • For the phrase "Getting Started" or the keyword "feature", enter feature "Getting Started".
Filter for items that contain these keywords or phrases: Enter the following string:
Duplication duplication
Getting Started "Getting Started"
Feature and Getting Started feature "Getting Started"

You can run partial or exact match queries on a keyword or a phrase contained within any text field. Or, you can run a full-text search query by filtering on keywords and phrases contained within the full-text search index. Team Foundation automatically indexes all long-text fields with a data type of PlainText and HTML and the Title field for full-text search.

Find items based on specific fields and field values

To find work items based on a keyword or phrase contained within other text string fields, specify either the friendly name or the reference name of the field. Enclose each phrase in quotation marks. You can determine the friendly name of a field by hovering over the field within a work item form. To determine the reference name of commonly used fields or to find a field that isn't listed on the form, see Work item field index.

Filter for items that meet this criteria: Enter the following string:
Contains one attached file. System.AttachedFileCount=1
Cut user stories. T:Story Reason=Cut
Or
T="User Story" System.Reason=Cut
Resolved by Peter. "Resolved By":Peter
Or
Microsoft.VSTS.Common.ResolvedBy:Peter
Modified today. "Changed Date"=@Today
Created yesterday as a test activity. "Created Date"=@Today-1 Activity=Test

Note

Some fields, such as History and Description, do not support partial word text searches. For example, if the History field contains the phrase reproducible behavior and you search for History:repro the work item isn't found. However, if you search for the complete string History:reproducible the work item is found.

Use @Me or @Today macros

The @Me macro expands to the full name of the current user in any work item search. The @Me macro is especially useful for creating a search that you can share with other users, and it can simplify your work by reducing the number of characters you must type to specify your own user name. For a description of all macros, see Query fields, operators, and macros, Query macros or variables.


Filter for

Enter the following string


Currently assigned to you

A=@Me


Created by you

C=@Me


Resolved yesterday

Resolved Date=@Today-1


Modified seven days ago

System.ChangedDate=@Today-7


Created yesterday under the Phone Saver team

Created Date=@Today-1 And Area Path=FabrikamFiber\Phone Saver


Use Equals, Contains, and Not operators

Use the following search operators to specify search criteria:

= (EQUALS) to search for exact matches of text.
: (CONTAINS) to search for partial matches of text.
- (NOT) to exclude work items that contain certain text. The NOT operator can only be used with field names.

The following examples show how to use operators when you create a search string.

Filter for items that meet this criteria: Enter the following string:
Assigned to Peter and not Active. A:Peter -S=Active
In which the Activity field wasn't Development. - Activity=Development
Resolved by Peter. "Resolved By":Peter
Contain the keyword triage in the title or description, aren't assigned to you, and aren't closed. triage -A=@me -S=Closed
Active bugs that are assigned to you that don't contain the keyword bugbash in the title. S=Active T=bug A=@Me -Title:bugbash

Q & A

Q: Does the search box support less than/greater than operators?

A: No. The search box doesn't recognize comparison operators such as greater than (>) or less than (<). It translates queries with these operators into a search phrase.