JIRA JQL - search for issues where custom field does not exist

jonas789 picture jonas789 · Mar 21, 2012 · Viewed 9.5k times · Source

I added a new custom field "Deferred to Date". Because custom fields are optional, none of the existing issues have it.

Now I want a JQL search query for all issues where the deferred date is null (doable) or the deferred date field doesn't exist for the record (this is what I can't find).

I looked at the JQL instructions at http://confluence.atlassian.com/display/JIRA/Advanced+Searching but I don't see anything for checking whether or not a field exists.

Hope this is clear.

Answer

Andrew Fogg picture Andrew Fogg · Apr 9, 2013

The JQL query that you need is

"Deferred to Date" is empty

Or (equivalent),

"Deferred to Date" is null

However, if you have just added the new custom field, then you need to re-index your JIRA instance before either of these JQL queries will work.

The "Re-Index" button can be found in the JIRA Admin under "Indexing",

  • JIRA Admin
  • General Configuration
  • Indexing
  • Re-Index