Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Labels field not responding correctly in filter

Andy Finley February 10, 2022

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?

3 answers

1 accepted

3 votes
Answer accepted
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 10, 2022

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)
Andy Finley February 10, 2022

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. 

0 votes
Alexis Robert
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 10, 2022

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

Andy Finley February 10, 2022

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.

0 votes
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 10, 2022

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)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events