It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How do I filter to exclude a label?

I'm having trouble using the JQL syntax to exclude a single label from a Greenhopper board. I get errors when trying to use "labels !~ theming" and "labels != theming" returns no results (because of most returning NULL for labels, I think). "Theming" is the label I'm excluding in this example, and in real life.

What is the syntax to exclude only a single label from a board using filters?

2 answers

1 accepted

27 votes
Answer accepted

Hi Alex,

I just gave this a try with project=project AND (labels != 'test' OR labels is EMPTY) and was able to pull up all issues in my project except those with the test label. Give this a try and let us know how it goes.

Thanks,

-dave

Looks like that did it! I'd tried NULL rather than Empty. Thank, Dave.

Like Seif Eldin Serag likes this

From the future I would like to thank you for your awesome solution. Thanks, Dave!

Like # people like this

You're my hero. Thank you

Worked!  Thanks.

Thanks for posting answer David, exactly what I was looking for!

Thanks for the tips !

if you want to do this with more than one label, you need to add the is EMPTY value for every label?

I have something like this:

project = "[PROJECT]" AND status in (Open, "In Progress", Reopened) AND (labels!= postponed OR labels is EMPTY) AND (labels !=testing_functionality_ignore OR labels is EMPTY)

but if you want to exclude 40 labels?

I think this works:

project = "[PROJECT]" AND status in (Open, "In Progress", Reopened) AND (labels not in (label1,label2,...,label40) OR labels is EMPTY)

Like Seif Eldin Serag likes this

Adding the first solution twice worked for me. So if my two labels I want to exclude are project and systemupgrade:

...AND (labels != project OR labels is EMPTY) AND (labels != systemupgrade OR labels is EMPTY)...

Like Seif Eldin Serag likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

Demo Den Ep. 7: New Jira Cloud Reports

Learn how to use two new reports for next-gen projects in Jira Cloud:  Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...

375 views 1 3
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you