I'm trying to create a filter that excludes tickets with a label of "Review" or "review", but it is excluding tickets that have never had either of those labels applied at any point in the ticket's history. My JQL is as follows:
project = RC AND assignee in membersOf("Epic PB Application") AND issuetype = Change AND status = Escalated AND labels != Review AND labels != review
Initially I had used the operator "not in"(Review,review), but that was excluding every ticket across the board. When I changed the logic to use the != operator, it picked up some tickets but not all of those which should have qualified. Again, I wish to stress that neither of these labels were ever used in the history of the tickets which aren't getting caught by the filter. What is going on?
Is the problem that you're expecting to see issues with no labels as well? If so, you could go with this query:
project = RC AND assignee in membersOf("Epic PB Application") AND issuetype = Change AND status = Escalated AND (labels NOT IN (Review,review) OR labels IS NOT EMPTY)
Yes, that was the problem. It was catching tickets with labels that weren't "review" but wasn't catching tickets where the labels field was empty. So, I made a slight tweak in your logic so that it said
(labels NOT IN (Review,review) OR labels IS EMPTY)
and now it works like a charm. Thank you both.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Andy Finley ,
you can remove the last "AND labels != review" as labels do not differentiate on upper/lower case. Then your filter should work fine.
Let me know if this helps,
--Alexis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's interesting, considering that when entering a label on a ticket, it will return a different result depending on upper or lower case, but I digress. Neither removing the 2nd "and review" or using the parenthetical logic from Mark had any effect. If I have any logic referencing the review label, I only get five results. When I remove the review label logic I get eight results--and none of those three extra tickets have any history of the review label being employed. It makes zero sense.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Andy Finley
Give this a try:
project = RC AND assignee in membersOf("Epic PB Application") AND issuetype = Change AND status = Escalated AND (labels != Review OR labels != review)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.