JQL- searching for components and issues without components

Some of my issue types / projects use components, and some don't.

I'm trying to set up a JQL query to search any issue where the component is in a list of specific components, or where the component is not set (i.e., one of the projects / issue types that don't use components). I'd like to say "... and component is empty ..." or something and still catch the latter, but I can't figure out how to.

You can see it with this JQL:

component is empty or component is not empty

I'd expect that to return all issues in my JIRA, but it only returns issues where the component field is not hidden for that project / issue type.

I know I could do it by listing out exactly which projects / issuetypes don't have components and avoid querying the component for those, but that's quite a bit of work, and users will be doing this kind of a query in my JIRA regularly.

Anyone have any good ideas on how to achieve this?

3 answers

1 accepted

0 votes
Accepted answer

What if you try something like:

(component is not EMPTY OR component is EMPTY) OR project in (ALL, YOUR, PROJECTS)

or replace 'OR PROJECT' with any other criteria

My problem is I have a sizeable list of combinations of which projects and issue types do not have components, and a large number of users who need to implement this in their queries. Some issue types have components in some projects, and not in other projects. Some projects have some issue types with components and some issue types without components.

So it's a good bit of logic for me to ask them to integrate into their queries. I can do this if this is the only way, I just expect this to be very error prone and difficult to maintain across all of my users.

If there isn't a better way, I'll help them set this up for now, and probably open a feature request to try to get an easier way around this.

Thanks!

I want to query based on components matching with some string, how can we do that?

component ~ 'Abc' it doesn't work for components

Whenever we have to filter using component it's necessary to control when the field is empty  ...example if I want to get those tickets in which component is different from "backend":  (component is empty or component not in (Backend))

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,299 views 12 19
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