Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JQL for labels NOT IN and labels != does not work

joecline July 22, 2023

I've tried various JQL to get only issues without a Deferred label and none of them seem to work. Am I doing something incorrectly? 

Issue I'm trying to get returned:

ZVwvoh0SnZ.png


All the below queries returned no results. 

chrome_0sHJFikWNR.pngchrome_jBEGzxIIgP.pngchrome_QJHzh2pNv8.png

 

2 answers

1 accepted

2 votes
Answer accepted
Evgenii
Community Champion
July 22, 2023

Hi, @joecline 

Please, try next query:

project = "RES" AND (labels not in (Deferred) OR labels IS EMPTY)

joecline July 24, 2023

That worked! thanks!

0 votes
Keith Robertson August 28, 2023

Instead of

labels != Deferred

labels not in (Deferred, HighlyVisible)

use

# Select ticket if missing the named label.
NOT (labels = Deferred)

# Select ticket if missing ANY of the named labels.
NOT (labels = Deferred AND labels = HighlyVisible)

# Select ticket only if missing ALL of the named labels.
NOT (labels in (Deferred, HighlyVisible))

These avoid having to check whether labels IS EMPTY.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events