5

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.

jonas789
  • 209
  • 3
  • 13

3 Answers3

8

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
Andrew Fogg
  • 468
  • 6
  • 13
1

You need to reindex your jira instance, may be that the problem

Sergey
  • 21
  • 1
1

Like Andrew mentioned, in order to get "is EMPTY" to work after a custom field is added, you will have to re-index Jira.

This may not always be feasible in production environment, especially if new custom fields are being created frequently (which is most likely the case if you use a plugin like CM4J, allowing project admins to configure multi-context custom fields).

Fortunately, if you have Scriptrunner for Jira installed, you can use the following JQL query to get all instances of a specific empty field without re-indexing:

issueFunction in issueFieldMatch("<sub-query>", "<field name>", "^$")
Shane
  • 95
  • 1
  • 3
  • 16