Forums

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

How do I create JQL filter that excludes certain values in a field, but includes "blank" values?

Mandy Ernst April 7, 2020

Trying to create a JQL query that excludes specific values in a field.  When the query runs, it also excludes records with "none" in the field.  These should be included in the query result, since the field is not required, so sometimes not populated.

Query Excerpt:     AND labels not in ("workflow", "report")

Results exclude any record with "workflow" or "report" in the label, but also excludes records where label = [none]

2 answers

2 accepted

2 votes
Answer accepted
John Funk
Community Champion
April 7, 2020

Hi Mandy - try adding something on the end like:

OR labels is empty

AND labels not in ("workflow", "report") OR labels is empty

0 votes
Answer accepted
Kristján Geir Mathiesen
Community Champion
April 7, 2020

Hi @Mandy Ernst 

AND labels not in ("workflow", "report") OR labels is null

These empty/null values can be tricky...

HTH,
KGM

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events