Share via


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

Azure DevOps Services | Azure DevOps Server 2020 | Azure DevOps Server 2019 | TFS 2018 - TFS 2013

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

You can run a powerful semantic search from the web portal for Azure DevOps Services or TFS 2017.2 or later versions when the server instance has been configured with the work item search extension.

For TFS 2017.1 and earlier versions, or where the work item search extension hasn't been configured, you can run semantic searches. With semantic search, you search against a fully indexed set of fields.

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.

Semantic search isn't supported for TFS 2017.1 and earlier versions. You can still run searches using an improvised search.

Fine-tune semantic search results

Semantic search isn't supported for TFS 2017.1 and earlier versions. You can still run searches using an improvised search.

Start an improvised search and use shortcut filters

For TFS 2017.1 and earlier versions, you can run improvised searches from the web portal or from Visual Studio Team Explorer. Improvised searches automatically scope to the items defined to the project you're currently connected to.

You can enter or select one or more of the following shortcut identifiers:

  • A =for Assigned To, (for example, A:Annie or A=@me)
  • C for = Created By, (for example, C:Peter or C=@me)
  • S for = State, (for example, S=New)
  • T for = Work Item Type, (for example, T=Task).

Use the @Me and @Today macros to specify your user name or today's date.

Use the =, :, and - operators to specify the operations Equals, Contains, and Not, respectively.

From the web portal

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

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: Type 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: Type 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 will not be found. However, if you search for the complete string History:reproducible the work item will be 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

Type 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: Type 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.