Why searching for empty custom field is not returning all issues it should


Recently I added an optional custom text field for my project and searching for issues with it empty is not returning all issues. JIRA version 5.2.2


Lets say I am working with a base JQL that returns 688 issues.

If to that base JQL I add "and customfield is empty" I get 0 issues.

If to that base JQL I add "and customfield is not empty" I get 210 issues.


So what is going on with the remaining 478 issues?

For reference I tried referring to the custom field in all the supported ways and my index is up to date. Could not find any bug report on this.

3 answers

1 vote

There's a third question that you can't actually ask properly:  "Show me issues where the field is not valid".  I suspect if you could answer it, you'll get 478 issues.  This is because the field is neither empty or filled, it's not physically there.  Bit like going into a clothes shop and asking for the beer rack - they don't have one, so there is no way to answer the question.

Look at the customfield list, find your custom field, and look at its "context" - I expect you'll find it is limited to a specific set of issue types and projects.  If it were global, you'd get the answers you were expecting...

Is this customfield in a context for a project or an issuetype? That would explain the differences. The 478 issues would have a context where the custom field is not defined for.

Thanks Udo.

Yes, that custom field is defined for a context based on project A and issue type B. But precisely the base JQL is searching for issues within that context.

So the base JQL is project=A and type=B

Ok. Can you tell us what type of searcher you are using for that field?

Field type is Text Field (< 255 characters) and searcher is "Free Text Searcher"

Just tried a corresponding search (for a text field with this searcher) on my side - everything is fine. And you're sure that you have done a reindex after you added this custom field?

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,197 views 13 19
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot