I have the following filter:
(assignee = currentUser() OR Developer = currentUser()) AND assignee = currentUser() AND status not in (Closed, Done) AND project not in (Loyalty, JIRA) ORDER BY fixVersion ASC, status ASC, priority DESC
This works correctly. I now want to add a clause to exclude tickets with a certain label, so I did this:
(assignee = currentUser() OR Developer = currentUser()) AND assignee = currentUser() AND status not in (Closed, Done) AND project not in (Loyalty, JIRA) AND labels not in (jira-dev-test) ORDER BY fixVersion ASC, status ASC, priority DESC
Now it's filtering out issues with that label, but also filtering out all issues without a label. What am I doing wrong?
It's because most human languages are fuzzy and imprecise, and we translate badly when we're talking to the computers.
You have three possibilities here:
Your clause is precise, but expressed in English, it says "look at the labels and tell me when jira-dev-test is not there". If the issue has no labels, there's nothing to look at. So it can't tell you that jira-dev-test is not there. You need to catch the "no label" fact somehow, and the nice clear way to do it is:
AND (labels not in (jira-dev-test) or labels is empty)
Add "Labels is EMPTY" clause as well.
(assignee = currentUser() OR Developer = currentUser()) AND assignee = currentUser() AND status not in (Closed, Done) AND project not in (Loyalty, JIRA) AND (labels is EMPTY OR labels not in (jira-dev-test)) ORDER BY fixVersion ASC, status ASC, priority DESC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.