How do I exclude a component from search?

Greg Jankowski September 10, 2013

I want to exclude a component name from a search.

When I try to add Not, Not In, Is Not from this query:

component = is not "Component Name" AND status in (Open, "In Progress", Reopened) AND assignee in (mzhilin) ORDER BY priority DESC

I get this error:
Error in the JQL Query: Expecting either 'OR' or 'AND' but got 'is'. (line 1, character 23)

What am I doing wrong?

5 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 10, 2013

You've got "= is" at the front. That's two operators in one place. Decide which one you want to use and remove the other. I'd tend towards "is not" as it's a little more readable than !=

2 votes
Gary Gilbreath November 16, 2017

I'm on JIRA 7.1.8 and none of the "not" operators work. In my case, I want a filter for issues that don't contain a component called XYZ. In the test project (PROJ) the issues either contain a component named XYZ or the component field is empty. In the future I plan to have a mix of blank component fields and some issues that have one or more components in them.

If I say "project = PROJ AND component = XYZ" or "project = PROJ AND component in (XYZ)" I get all the issues with that component. This is expected.

If I say "project = PROJ AND component != XYZ" or "project = PROJ AND component not in (XYZ)", I expect to see all the issues that have a blank component, but instead I get "No issues were found to match your search".

If I use the "project = PROJ AND component is EMPTY" I will get all the issues where the component field is empty. While you may think this is what I want, it isn't. I want is all issues where the components are empty OR any any issues where the component is NOT XYZ.

Any suggestions?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 16, 2017

I would ask this again as a new question.  The original conversation is almost 5 years old and things have changed.

However you are nearly there - try combining the empty clause with an or on "not in xyz"

Like Cathy Coulthard likes this
1 vote
RambanamP
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 10, 2013

you should't use "component = is not "Component Name"" like this.

you have to use like component != "Component Name"

1 vote
Theinvisibleman
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 10, 2013

Hi Greg,

Perhaps you could try replacing the '= is not' with '!=', for example, like this :

component != "Component Name" AND status in (Open, "In Progress", Reopened) AND assignee in (mzhilin) ORDER BY priority DESC


Please give this query a try and see if it suits your requirements :)

0 votes
Greg Jankowski September 10, 2013

That was it.

Thanks!

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question