Skip to content

Latest commit

 

History

History
273 lines (225 loc) · 14.5 KB

query-field-value.md

File metadata and controls

273 lines (225 loc) · 14.5 KB
title titleSuffix description ms.custom ms.service ms.author author ms.topic monikerRange ms.date
Query by field values in Azure Boards and Azure DevOps
Azure Boards
Learn how to create a query by filtering on field values that are compared to other field values in Azure Boards and Azure DevOps.
boards-queries
azure-devops-boards
chcomley
chcomley
example-scenario
<= azure-devops
10/25/2021

Query by field value comparisons in Azure Boards and Azure DevOps

[!INCLUDE version-lt-eq-azure-devops]

You can create queries based on how one field's value compares to another using the comparison field operators. This query is useful to filter work items based on:

  • Is the person who created the work item the same as or different than the person assigned to it? Or, who closed it
  • Which Tasks were closed before or after their Target Date.

Supported data types

You can use the comparison field operators—=[Field], <>[Field], >[Field], <[Field], >=[Field], <=[Field]—with the following field data types. The data type you select for the Field and the Value must match.

  • Boolean (supports =[Field], <>[Field]
  • Date/Time
  • Double, Integer
  • GUID
  • Identity
  • String (excluding Tags)

Note

Some combinations of data type and comparison field operator might not make sense to use, such as Title >=[Field] or Assigned To <=[Field].

Sample filters

:::row::: :::column span="1"::: Filter for :::column-end::: :::column span="1"::: Include these query clauses :::column-end::: :::row-end::: :::row::: :::column span="1"::: Work items closed by someone other than the person who created the work item
:::column-end::: :::column span="1":::

Created By <>[Field] Closed By State = Closed
:::column-end::: :::row-end::: :::row::: :::column span="1"::: Tasks whose Original Estimate is less than Completed Work :::column-end::: :::column span="1":::

Original Estimate <=[Field] Completed Work
:::column-end::: :::row-end::: :::row::: :::column span="1":::

Closed tasks completed before their target date :::column-end::: :::column span="1":::

Target Date <=[Field] Closed Date State = Closed
:::column-end::: :::row-end:::

Fields that support field comparison

The following table provides an index to those fields that support field comparison queries.

Note

Not all fields listed are supported for all projects or work item types. However, you can customize a process or work item type by adding custom fields which you can use for the purposes of queries and field comparisons. For more information, see Add a custom field to a work item type (Inheritance process) or Add or modify a field (Online XML process).

:::row::: :::column span="1":::

A

B

C

:::column-end::: :::column span="1":::

D-E-F

H

I

J-L-M-N

O-P-Q

:::column-end::: :::column span="1":::

R

S

T

U-V-W

:::column-end::: :::row-end:::

Related articles

[!INCLUDE temp]