How to exclude work items from a plan that are not tagged wit specific tags.
In another words there are some work items that have Tag1 some other work items that have Tag2. I want to include the items with Tag1 & Tag2 but exclude all others.
I used the exclude expression as follows:
exclude !tags: Tag1 Tag2 but that did not work.
Any suggestion how to go about that?
2 answers
You should be able to use the syntax:
!tags:tag1 !tags:tag2
There's some discussion on this behavior in:
Quick query syntax AND is not working as expected. (384442)
Shawn
Comments
!tags:tag1 !tags:tag2 syntax is not working as expected. instead of the union of work items with Tag1 and Tag2, it seems it is taking the Work items with Tag1 and then reducing the list to include the Work items with Tag2. So effectively it is listing the Work items that have both Tag1 and Tag2. This is not what I am looking for. I am looking to include all Work Items that have either Tag1, Tag2 or both. Since the Plan only allows us to exclude, I want to exclude all work items that Do Not have Tag1, Tag2 or both.
Mounir bsaibes,
It looks like your expectations match with the description's steps to reproduce (step #7) from defect 384442. If you are using a version 4.04 through 6.0.1, this is the problem that you're experiencing and it's fixed in 6.0.2.
Shawn