Search code examples
jirajql

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


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.


Solution

  • 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