Perform an adhoc search

VSTS | TFS 2018 | TFS 2017 | TFS 2015 | TFS 2013

You can find items using shortcut filters or by specifying keywords or phrases, specific fields/field values, assignment or date modifications, or using Equals, Contains, and Not operators.

Search box queries automatically scope to the items defined to the team project you're currently connected to. To search across team projects, use the query editor. Also, searching is not case-sensitive.


Feature availability: You can add the Code Search extension or configure Work Item Search to TFS 2017 or later versions.

If you've added the Code Search extension, you'll notice that the search box moves to the top row, and you can quickly switch between work item and code searches.

The search box retains the last used search context for each hub. To learn more about code search, see Get started with Code Search.

Type the ID in the Search work items box and then choose the search icon. The Search work items box is available from a team project context.


If your admin has installed the Work item search extension, the search box will perform an adhoc query using the extension. You'll no longer be able to initiate a managed search. Instead, you'll need to open the Work>Queries page and construct a query. To learn more, see Adhoc vs managed work item queries.

Search Work Items Text Box

Click within the box to view the set of filters for assignment, workflow state, keyword, or work item type.

For example, enter A=@Me T=Task to list all tasks assigned to you.

Use shortcut filters

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.

Work search menu

With Work Item Search configured

Work search menu


Work Item Search can be configured with TFS 2017.2 and later versions. To learn more, see Set up and administer Microsoft Code Search and Work Item Search.

Without Work Item Search configured

Search box shortcut menu (web portal)

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

Search box shortcut menu (web portal)

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. You must 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 perform partial or exact match queries on a keyword or a phrase contained within any text field. Or, you can perform 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 is not 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
T="User Story" System.Reason=Cut
Resolved by Peter. "Resolved By":Peter
Modified today. "Changed Date"=@Today
Created yesterday as a test activity. "Created Date"=@Today-1 Activity=Test


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 7 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 these 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 was not Development. - Activity=Development
Resolved by Peter. "Resolved By":Peter
Contain the keyword triage in the title or description, are not assigned to you, and are not closed. triage -A=@me -S=Closed
Active bugs that are assigned to you that do not contain the keyword bugbash in the title. S=Active T=bug A=@Me -Title:bugbash

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

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.