Searching for Epics without a component


We are trying to search for all Epics not having a specific component, but no result is returned even if none of them have that component.

We are using the following query :

Project = MyProject and type in (Epic) AND component not in (MyComponent)

If we take off the component part of the query, I get can see all of the Epics. What are we doing wrong here?


Edit : Misleading words in JQL + Added Code block

1 answer

1 accepted

1 vote
Accepted answer

Ah, yes, human language lets us down a little here.  "component not in <complete list>" is logically not the same as "no component".  The way we think in a more fuzzy logic than computers falsely equates the two ideas.

The first one is implying that you're looking for a specific component, so an issue has to have one for the query to work.  Then you're saying "the component found must not be in a list of <all>".  So you then rule them all out.


Project = PROJECT and type in (Epic) AND component is empty

You'll notice that is not looking for "issues with components", the language is specifically "no component set"


Sorry, I think the way I wrote my example was misleading. I should have wrote : 

Project = MyProject and type in (Epic) AND component not in (MyComponent)

Basically what I'm trying to achieve, is list all Epics that have not a specific component (MyComponent) as a component.


It's at least half my fault for not reading your question properly.  Probably all my fault.

My explanation stands, but only gets you halfway there.  The query certainly only gets you half an answer.   Try:

Project = MyProject and type in (Epic) AND (component is empty OR component not in (MyComponent) )


This is the answer here.

Thanks for your help

I would expect this to be a tautology:



Why is it that the following doesn't return all results?

component IN (a, b, c) OR component NOT IN (a, b, c)


Or even...

(component IN (a, b, c)) OR !(component IN (a, b, c))



I've learned that jql does not check for empty automatically for you. So whenever you use a query like:

component NOT IN (a, b, c) AND "Epic Link" NOT IN (d, e, f) AND labels NOT IN (g, h, i)


You need to add the IS EMPTY to your query.

(component IS EMPTY OR component NOT IN (a, b, c)) AND ("Epic Link" IS EMPTY OR "Epic Link" NOT IN (d, e, f)) AND (labels IS EMPTY OR labels NOT IN (g, h, i))


Interestingly, doing a negation of an IN clause has the exact same problem

component IN (a, b, c)  !=  !(component IN (a, b, c))


You still need to add the IS EMPTY check

component IN (a, b, c)  ==  component IS EMPTY OR !(component IN (a, b, c)) == component IS EMPTY OR component NOT IN (a, b, c)

It's explained above, but let's try it again.  You're ignoring the third answer to the question of "not answered".  Is <not answered> in (a, b, c)?  You can't tell because you don't have an answer.  You need to explicitly catch "empty", because it's not the same as "look for empty in a fixed list"


Ah, comments crossed over.  You've spotted what I was explaining.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,807 views 18 22
Read article

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