Work Item Search Syntax (Team Web Access)
You can use the Team Web Access search box to search for work items. In the search box you can specify keywords and phrases, and use variables and shortcut identifiers to find work items. Searching is not case sensitive.
Topic Contents:
Specifying Keywords and Phrases
Specifying Fields
Using the @Me Macro
Using Search Operators
Required Permissions
To perform searches in Team Web Access, you must be a member of the Readers group or have your View work items in this node permission set to Allow. For more information, see Team Foundation Server Permissions.
Specifying Keywords and Phrases
You can use keywords and phrases to find specific text in the Title or Description fields of work items by typing keywords into the Search box. You must enclose each phrase in quotation marks.
The following examples show how to find keywords and phrases in the Title or Description fields.
To find all work items with the keyword duplication, type the following string:
Duplication
To find all work items with the phrase Getting Started, type the following string:
"Getting Started"
To find all work items with the phrase Getting Started and the keyword feature, type the following string:
feature "Getting Started"
Specifying Fields
You can search fields other than Title and Description. You must enclose each phrase in quotation marks. To specify the work item field name, type the search string as shown in the following examples.
To find all the work items that are in the Active state, specify either one of the following two search strings:
system.State=Active
State=Active
To find all the Bug work items that are in the Active state, type the following string:
State=Active WorkItemType=bug
To search for work items assigned to a team member, type the following string:
System.AssignedTo="First Last"
You can use shortcut identifiers instead of the full names of several frequently-used fields, as shown in the following table:
Shortcut |
Field |
---|---|
A |
AssignedTo |
C |
CreatedBy |
S |
State |
T |
WorkItemType |
The following examples show how to use two of shortcut identifiers.
To find all work items of any type that are in the Active state, type the following string:
S=Active
To find all bug work items that are in the Active state, type the following string:
S=Active T=bug
Using the @Me Macro
You can use the @Me macro to specify a search string for work items that are associated with you in some way. @Me is a macro that expands to the full name of the current user in any Team Web Access 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. The following examples show how to search for work items by using the @Me macro.
To find all work items assigned to you, type the following string:
A=@me
To find all work items created by you, type the following string:
C=@me
Using Search Operators
You can use three search operators to specify search criteria, as shown in the following table.
Operator |
Description |
---|---|
= |
The EQUALS operator. Use this operator to search for exact matches of text. |
: |
The CONTAINS operator. Use this operator to search for partial matches of text. |
- |
The NOT operator. Use this operator 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.
To find all work items assigned to yourself, type the following string:
A=@me
To find all work items in which the discipline field contains the text proj, type the following string:
Discipline:proj
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.
To find all work items that contain the keyword triage in the title or description, are not assigned to you, and are not closed, type the following string:
triage -A=@me -S=Closed
To find all active bugs that are assigned to you that do not contain the keyword bugbash in the title, type the following string:
S=Active T=bug A=@Me -Title:bugbash
See Also
Tasks
Concepts
Query Fields, Operators, Values, and Variables
Finding Bugs, Tasks, and Other Work Items
Change History
Date |
History |
Reason |
---|---|---|
June 2011 |
Corrected the last code example. |
Customer feedback. |