Hi,
I need help with a JQL query, please. I'm having trouble with “not in.” I feel like there's been a change, or maybe I've been using it wrong all along?
For example, I have this JQL:
project = Name_project and issuetype = Anomalies and labels not in (ano_US) and statusCategory NOT IN (Done)
What I'm trying to do is isolate only the anomalies that are tagged with the label “ano_US” and keep the rest. I feel like at one point, just putting “not in” was enough to exclude them.
Have I missed something? If so, please let me know.
Thanks in advance for your help.
Hello @Wakil BENAMOUR ,
Your query will also exclude work items without a label.
To keep those in, you need to add:
... AND (labels NOT IN ("ano_US") OR labels IS EMPTY) ...
Would that solve your problem?
Hi @Wakil BENAMOUR,
as mentioned by others - you're likely missing the IS EMPTY part of your JQL filter.
If you want a more powerful filtering experience, and if you're open to solutions from the Atlassian Marketplace, you may want to have a look at the app that my team and I are working on, JXL for Jira.
JXL is a full-fledged spreadsheet/table view for your Jira data that allows viewing, inline-editing, copy-pasting, sorting, and filtering by all your work items' fields, much like you’d do in e.g. Excel, Google Sheets, Smartsheet, or Airtable.
It also comes with a long list of further features, like support for complex label filtering (including regular expression matching). This is how it looks like in action:
This is really just one of a virtually infinite number of sheets you can build - it all depends on what data you want to see and drill into.
Any questions just let me know,
Best,
Lukas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Wakil BENAMOUR
If you write labels not in (ano_US), it returns all tickets that have la abel and it is not ano_US.
For the correct one, you should use
labels not in(ano_US) or labels is empty, for including also tickets without labels.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If your goal was to get a list of anamolies for your project which do not have label ano_US, that is being met by your JQL before the AND. The second part is needed only if you have to get unresolved items.
I hope my answer makes sense. Let me know if I misunderstood it.
Have a great day!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
The not in
operator works correctly in Jira JQL—it hasn't changed.
I think it could be a missunderstanding:
labels in (ano_US)
→ Returns issues WITH the label "ano_US"labels not in (ano_US)
→ Returns issues WITHOUT the label "ano_US"You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.