I have 4 DevOps tags and 3 scenarios:
- Work items that only contain 1 out of the 4 tags
- Work items that contain all 4 tags
- Work items that contain more than 1 but less than 4
I'm trying to build the following queries and having issues with 2-5:
- return work items that contain all 4 tags (no issues)
- return work items that contain tag 1 but do not contain tag 2 AND tag 3 AND tag 4
- return work items that contain tag 2 but do not contain tag 1 AND tag 3 AND tag 4
- return work items that contain tag 3 but do not contain tag 1 AND tag 2 AND tag 4
- return work items that contain tag 4 but do not contain tag 1 AND tag 2 AND tag 3
Query 1 (successful - only returns items that contain all 4 tags)
Contains Tag 1 And Contains Tag 2 And Contains Tag 3 And Contains Tag 4 (clauses are grouped)
However, when I try the opposite it is also excluding work items that only contain 2 of the tags e.g., work items that only contain Tag 1 and Tag 3. The query seems to be treating them as ‘or’ instead of ‘and’ and I can’t figure out where I’m going wrong:
Query 2
Does not Contain Tag 2 AND Does not Contain Tag 3 AND Does not Contain Tag 4 (clauses are grouped)
Any suggestions would be greatly appreciated!
Cordelle
UDPATE WITH USER SCREENSHOTS:
It works. All tags:
contain tag 1 but do not contain tag 2 AND tag 3 AND tag 4
contain tag 2 but do not contain tag 1 AND tag 3 AND tag 4
or more complex query
Additional one: