How can I search for issues that do NOT have a certain label

I have tried various advanced searches and cannot get the syntax right. I want to look for all issues of certain status (for example, open or reopened or inprogress) but exclude any with a certain label (for example OnHold). Tried every kind of NOT but cannot get it to work. HELP please.

12 answers

1 accepted

This widget could not be displayed.

had the same problem, solved it this way:

status in("open","reopened","inprogress") and (labels not in("OnHold") or labels is EMPTY)

It works for me. Thanks,

The case this doesn't resolve is for issues with any other labels.

In JIRA on demand this query returns the same issues as a query returning only issues with no labels. The inclusion of not in ("XXXX") makes no difference.

You saved my day :)

This works for me just fine on JIRA v6.4.1. I didn't think to consider EMPTY like a NULL value that requires an explicit comparison. Thanks!

Perfect, just what I was looking for.

Nice. Many thanks.

Words cannot express my thanks!

Really saved my day thanks a lot🙂

It works like a dream!!!!! Thank you very much!!!!!

Top stuff.  Thanks Miroslav

Thanks!

Great help. Thanks

This widget could not be displayed.

I have issues logged that have a "DEMO" label. operationally I want to filter these out, prety much as the OP. There wasn't a proper anser above, a couple of fragments so I eventually came up with:

    and (labels is empty or (labels is not empty and labels not in (DEMO)))

This means if it's empty, list it. If it has any label, filter out issues that have the DEMO label. Hope that clarifies things.

Unfortunately this doesn't seem to work for me.

the query is slightly more complicated:

project in (WIN) AND issuetype in (Epic, Initiative) AND status not in (Delivered, Closed, Cancelled) AND (labels not in ("Prime-Backlog") OR labels is EMPTY)

 

I get the same number of issues back with or without the last AND clause and get labels I don't want.

This widget could not be displayed.

Try

status in ("open","reopened","inprogress") and labels not in ("OnHold")

I tried adding a screen shot but it isn't showing...I'll try converting to JPG

It takes it but says no issues found, and there ARE issues with that label!!!

Notice, I can use "in" to find ones with the label, and it works, but the "not in" returns no entries, when there should be LOTS.

When you say NOT in, it will find issues without that label but in the mentioned statuses. Are you saying you have issues in those states without the label?

I added the picture, but cannot see the attachment???

I would raise the issue with Atlassian support.

PS. In Progress is two words, I fixed that.... still doesn't work

Correct. I have many issues in those statuses without that label. They either have NO label, or some other label, but the query returns NO entries whatsoever.

This widget could not be displayed.

May be caused by the problem I report in

https://answers.atlassian.com/questions/174362/search-with-not-requires-and-contrary-to-documentation

Seems to search for A and not B, you must say

A AND NOT B

not

A NOT B

which the documentation says.

This widget could not be displayed.

Hi,

How do i get all issues without a specifc label xy

the query

project = A AND not labels = xy

is not workiing

can anyone help?

Maybe try

project = A AND labels NOT IN (xy)

This widget could not be displayed.

Hi

tried this as well without sucess.

I got zero results back even if i have issues from that project without label = xy

I am using JIRA 5.2.1

Any more suggestions?

Try

project = A AND (labels NOT IN (xy) OR labels IS EMPTY)

It behaves like SQL's NULL, where any comparison involving NULL (except for IS NULL) is false.

This widget could not be displayed.

Hi

Check this, may be usefull for you,

https://answers.atlassian.com/questions/73065/labels-does-not-contain-is-not-working

Hope this helps.

This widget could not be displayed.

Great works you both made my day!

This widget could not be displayed.

Thanks for your help smile This helped me with a query I was trying to get to work.

status in ("current sprint") AND (labels not in ("Tasking") OR labels is EMPTY)

This widget could not be displayed.

Really saved my day thanks a lot☺

This widget could not be displayed.

That helped a lot, thanks

Pete

This widget could not be displayed.

I had same issue. Had difficulties to filter Labels. I am using version 7.5.3

(labels not in (X,Y) or labels is EMPTY ) and status in (Backlog, Analysis).

Adding the "labels is empty" helped.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

262 views 5 0
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you