Logical Grouping (Work Item Query Reference)
You can conjoin or negate any expression and then group the expression for evaluation.
Logical Grouping
You can use the terms and and or in the typical Boolean sense to evaluate two clauses. You can group logical expressions and further conjoin them, as needed. Examples are shown below.
WHERE [System.State] = ‘Active' and [System.AssignedTo] = 'joselugo' and ([System.CreatedBy] = 'linaabola' or [Adatum.CustomMethodology.ResolvedBy] = 'jeffhay') and [System.State] = 'Closed'
WHERE [System.State] = 'Active' and [System.State] ever 'Closed'
You can negate the contains, under, in, and ever operators by using not. The examples below query for all work items that are not classified within the sub-tree of 'MyProject\Feature1'.
WHERE [System.AreaPath] not under 'MyProject\Feature1'
WHERE [System.AssignedTo] not ever 'joselugo'