How to exclude work items from a plan that are not tagged wit specific tags.
I need to exclude Work items from my plan that do not include either one of 2 different 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
Mounir bsaibes,
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
Mounir bsaibes
commented Nov 07 '16, 10:28 a.m.
!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.
Shawn Maclaga
commented Nov 08 '16, 8:42 a.m.
Mounir bsaibes,
|
I had the same problem when using the !expression... I've seen it work on 6.0.2 but not on 4.0.7
I used Expression: !tags:Tag1 !tags:Tag2 this worked ok. Also you may want to try !tags:"Tag 1" !tags:"Tag2" Comments
Mounir bsaibes
commented Nov 08 '16, 9:29 a.m.
Thanks Shawn & Matt,
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.