Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

RESOLVED: Long search term/syntax in JIRA Server not working


Hi there,

I am hoping someone can assist. I am trying to use a search rule/syntax in JIRA Server to find where a custom field is empty but does not include a sequence of other options. The rule is below, but it't not working as it seems to be weeding out all issues, instead of only those without the status, issuetype and component options. Is someone able to assist? 

The rule is: 

project in ("Project Name") AND "Custom Field" is EMPTY AND status not in (Completed, Review) AND issuetype not in (Epic, Activity) AND component != "Component name" ORDER BY created ASC

Thank you!


It looks just fine to me. What part of the string is not working? I mean isn' t there some fields you don' t have on a screen for example, but they are fulfilled, so not really empty?

Try trimming the search to just the empty field first.

Also, use resolution is empty if you're looking for issues that are not done.

With components you want to add syntax to find issues where component is also empty so you'll need to wrap that in an OR statement.

The best way to debug searches is to break them into parts and verify they give expected results. Then join them together to narrow down further.

I'm on my phone so not easy for me to give examples. Sorry.

Like # people like this

What Tany said ...

Try this JQL instead:

project in ("Project Name") AND "Custom Field" is EMPTY AND status not in (Completed, Review) AND issuetype not in (Epic, Activity) AND (component is empty OR component != "Component name") ORDER BY created ASC
Like # people like this

Ohh wow this worked!!! Thank you so much, I really appreciate your help with this @Peter-Dave Sheehan and @Tanya L Christensen 

FYI @Mykenna Cepek the above rule worked :) 

Like # people like this
project in ("Project Name") AND "Custom Field" is EMPTY AND status not in (Completed, Review) AND issuetype not in (Epic, Activity) AND (component is empty OR component not in ("Component name")) ORDER BY created ASC

I would suggest you use this JQL.

Otherwise you will also get issues which have two (or more) components (say "Component name" & "Other Component") and that does not match "Component name", so you will see it in your query result.

Like Tom Lister likes this

Hi @Amy Likoravec 


Your JQL looks fine and should return issues. So now the pain part, I would break down the JQL into parts and compare. Start with project name and the custom field part and then build off of that. Maybe there aren't any issues that match your long JQL statement :)




Mykenna Cepek Community Leader Feb 08, 2022

If you remove this part:

AND "Custom Field" is EMPTY

and run your query, do some issues show?

Like @Tanya L Christensen was saying, try your query in pieces, to narrow down the bit that is not behaving as expected.

Hi @Tanya L Christensen @Tim Perrault  @Klára Zikešová 

Thank you so much for coming back to me. The rule is definitely not working as I have created some test issues which should appear and they aren't. Basically, the rule works when I have removed either the status, issuetype or component part and when I add one of them back in, the rule breaks, so i wondered if it's because it's too long. 

Basically, I need to find all issues where the custom field (which is a team field) is empty, but not including those which have a specific component tagged, are in completed or review status or an epic or activity issuetype.

@Tanya L Christensen I tried resolution is EMPTY which didn't work, and I also need to weed out those in 'review' status too. When you say components need to be wrapped in an OR statement, what do you mean by that? 

Thanks again!

Try using this instead:

project = "Project name" AND "Custom field" is EMPTY AND status not in (Completed, Review) AND issuetype not in (Epic, Activity) And component != "Component name" ORDER BY created ASC

If it doesn't work, debug by first taking out Component and orderind and see if the rest filters something. Then you can add. You also want to leave out the part of ordering in ascending order for starters.

Here is an example of a JQR I use in searching for issuetypes in a particular project, of a particular issuetype and not estimated.

project = "Project name" AND "Story Points[Number]" is EMPTY AND status not in (Done, Abandoned) AND issuetype in (Story, Bug, Research, Spec, Testing)

hope this helps.

@Amy Likoravec 

you can try

("Custom Field" is EMPTY and component not in ("Given the components"))

 it is critical to play with and/or conditions properly enclosed in braces.

If you query for things that can be empty, you must always add the empty case:

(component != "Component name" OR component IS EMPTY)

Have you made any configurations or added the customfield? I found if something like "customfield is not empty" doesn't work for JQL, it is typically because the project/instance hasn't been a re-indexed after field has been configured. 


Log in or Sign up to comment

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you