Quick query syntax

Use quick query syntax to find, filter, and colorize work items on the Planned Items page of a plan or in the My Work view.

Important terminology:
Colorize
To highlight work items that match an expression with a selected color. The color of a work item is controlled by color tags in the web client.
Filter
In the Eclipse client, in the My Work view, to display work items that match the expression.
Exclude
To remove work items from the plan view that match an expression.

Enter quick query syntax in the Expression field. The syntax follows the format of attribute:value.

Important: If the value contains a space, surround the value with double quotation marks. For example, filedAgainst:"Web Client".
Table 1. General syntax and examples
Syntax Description Example Example Result
attribute:value attribute:value Matches work items if both expressions have different attributes and return true. If you use two of the same attributes and the attribute type is Integer, Boolean, Instant, Duration, Timespan, Workitem, Item (for example, Owner), Enumeration (for example, Priority), it creates an OR condition. For other attribute types, it creates an AND condition.
Note: If you use two of the same attributes and the attribute type is TAGS, it creates an OR when used within a Color condition, but AND with an Exclude condition.
  1. priority:high severity:major
  2. priority:high priority:low
  3. tags:tag1 tags:tag2
  4. Two separate filters where one is tags:tag1 and the other is tags:tag2.
  1. Matches only the work items where priority and severity are set to high and major.
  2. Matches only the work items where priority is high.
  3. For a Color condition, matches all work items that have tag1 OR tag2. For an Exclude condition, matches all work items that have tag1 AND tag2.
  4. Matches all work items that have tag1, tag2, or both.
attribute>value Matches work items with values that are greater than the specified value.

estimate>1

Matches work items where the estimated work duration is greater than 1 hour.

attribute<value Matches work items with values that are less than the specified value.

severity<normal

Matches work items where the severity is unclassified or minor.

!attribute:value Matches work items with values that do not contain the specified value.

!owner:Jack.

Matches work items that are not assigned to Jack.

filedAgainst:"Category" Matches work items that are filed against the category that you indicate, but does not include subcategories of that category.

filedAgainst:Server

Matches work items where the filed against category is server. Does not include the subcategories of that category.

filedAgainst~"Category" Matches work items that are filed against the category that you indicate, and includes subcategories of that category.

filedAgainst~"Web Client"

Note: If the value contains a space, surround the value with double-quotation marks.

Matches work items where the filed against category is Web Client. Includes the subcategories of that category.

Table 2. Boolean syntax and examples
Attribute Syntax Values Example Example Result
Modified modified True, False modified:false Matches work items that are unchanged.
Is Resolved resolved True, False resolved:true Matches work items that are resolved.
Table 3. Duration syntax and examples
Attribute Syntax Values Example Example Result
Effective Estimate (corrected estimate if set; otherwise, the original estimate) estimate Number of hours, assuming that 1 day equals 8 hours. estimate:0.5 Matches work items with a 30-minute effective estimate.
Effort Tracking (Time Remaining or Time Spent, depending on the project configuration to track time) effort Number of hours, assuming that 1 day equals 8 hours. effort:16 Matches work items with 2 days of effort tracking.
Original Estimate originalEstimate Number of hours, assuming that 1 day equals 8 hours. originalEstimate:8 Matches work items with a 1-day original estimate.
Corrected Estimate correctedEstimate Number of hours, assuming that 1 day equals 8 hours. correctedEstimate:24 Matches work items with a 3-day corrected estimate.
Time Spent timeSpent Number of hours, assuming that 1 day equals 8 hours. timeSpent:0 Matches work items with no time spent value.
Minimal Estimate minEstimate Number of hours, assuming that 1 day equals 8 hours. minEstimate:8 Matches work items with a minimum estimate of 1 day.
Maximum Estimate maxEstimate Number of hours, assuming that 1 day equals 8 hours. maxEstimate:16 Matches work items with a maximum estimate of 2 days.
Table 4. Enumeration syntax and examples
Attribute Syntax Values Example Example Result
Priority priority Attribute enumeration values, such as Unassigned, Low, Medium, and High priority:Low Matches work items that have a low priority.
Severity severity Attribute enumeration values, such as Unclassified, Minor, Normal, Major, Critical, and Blocker severity:Unclassified Matches work items with an unclassified severity.
Table 5. Timestamp syntax and examples
Attribute Syntax Values Example Example Result
Creation Date creationDate Absolute or relative date creationDate:today Matches work items created today.
Due Date dueDate Absolute or relative date dueDate<today-10 Matches work items due less than 10 days ago.
Modified Date modifiedDate Absolute or relative date modifiedDate>today-20 Matches work items that are modified in the previous 20 days.
Resolution Date resolutionDate Absolute or relative date resolutionDate:2013-10-21 Matches work items that are resolved on October 21, 2013.
Start Date startDate Absolute or relative date startDate>2013-02-10 Matches work items that started after February 10, 2013.
Table 6. Integer (long and decimal) syntax and examples
Attribute Syntax Values Example Example Result
ID id Integer id:2345 Matches work items that have an ID of 2345.
Planned Time Variance variance Integer variance<=1 Matches work items in which the difference between the current schedule time span and the planned schedule time span is less than 1.
Draft comment:
LWH: Should Table 7 be "Work item syntax and examples"? If so, should table 7 be combined with table 11?
Table 7. Item syntax and examples
Attribute Syntax Values Example Example Result
Owner owner User name owner:Gilbert Matches work items that are assigned to Gilbert.
Created By creator User name creator:Lenny Matches work items that Lenny created.
Modified By modifiedby User name modifiedby:Jack Matches work items that Jack modified.
Filed Against filedAgainst Category name filedAgainst:WebUI Matches work items that are filed against WebUI.
Planned For plannedFor Iteration name plannedFor:Sprint1 Matches work items that are planned for Sprint1.
Team Area teamArea Team area name teamArea:SVT Matches work items from the SVT team area.
State Group stateGroup State group names, such as Open, In Progress, and Closed stateGroup:Open Matches open work items.
Timeline timeline Timeline name timeline:"Main Development [Project Timeline]" Matches work items from the Main Development [Project Timeline] timeline.
Table 8. Reference syntax and examples
Attribute Syntax Values Example Example Result
Failing Test Cases failingTestCases 1, set, unset failingTestCases:unset No failing test cases.
Open Defects openDefect 1, set, unset openDefect:unset No open defects.
Tracks tracks Number of references tracks:1 Matches work items that have 1 reference of type tracks.
Table 9. String and HTML syntax and examples
Attribute Syntax Values Example Example Result
Summary summary Any string summary:invalid Matches work items that have the text invalid in the summary.
Primary Tag (first tag on the item) primaryTag
Note: To view work items that do not have tags, use !primaryTag: as the value.
Any string primaryTag:SVT Matches work items that have SVT as the first tag in the tag field.
Table 10. Tags syntax and examples
Attribute Syntax Values Example Example Result
Tags tags Tag name tags:nis_rtc40 Matches work items with the tag name nis_rtc40.
Table 11. Work item syntax and examples
Attribute Syntax Values Example Example Result
Work Item type Work item type name type:Task Matches work items that have the Task work item type.
Table 12. Workflow resolution syntax and examples
Attribute Syntax Values Example Example Result
Resolution resolution Resolution name resolution:Duplicate Matches work items that are resolved as duplicates.
Table 13. Workflow state syntax and examples
Attribute Syntax Values Example Example Result
State state State name state:Verified Matches work items that have a verified state.
Table 14. Deliverable or Release syntax and examples
Attribute Syntax Values Example Example Result
Found In foundIn Release name foundIn:MyRelease Matches work items that have Found In MyRelease.