we have the following filter:
project = XYZ AND issuetype = Bug AND fixVersion = XY-2021-nn OR labels = Bugs2021-nn ORDER BY issuetype ASC, key DESC
Now we would like to exclude some bugs. We tried to add for example
AND affectedVersion != "not-for-buglist"
The bug that has this affectedVersion was excluded, but also all bugs that has the affectedVersion not set were excluded.
How can we just exclude the bugs from the list that has affectedVersion set to "not-for-buglist"?
project = XYZ AND issuetype = Bug AND (fixVersion = XY-2021-nn OR labels = Bugs2021-nn) and (affectedVersion is EMPTY or affectedVersion != "not-for-buglist") ORDER BY issuetype ASC, key DESC
Maybe you were missing the "is empty" part? Because contrary to popular expectation just saying a value != X will make Jira ignore all issues where there is a null value, it will just filter out anything having a value, just not X.
Also added extra brackets at the beginning - unless you intent to filter across the whole instance.
With the OR it will just do 2 searches really, left part, right part, then join them together. This would mean that in your original query you were filtering across the whole instance.
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event