Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

jira

jql

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.

like image 239
jonas789 Avatar asked Mar 21 '12 15:03

jonas789


People also ask

What does != Mean in JQL?

The " != " operator is used to search for issues where the value of the specified field does not match the specified value. (Note: cannot be used with text fields; see the DOES NOT MATCH (" !~ ") operator instead.)

How do I do a wildcard search in Jira?

Jira supports single and multiple character wildcard searches. To perform a single character wildcard search, use the " ? " symbol. To perform a multiple character wildcard search, use the " * " symbol.

How do I create a field searchable in Jira?

Go to the list of custom fields, find the one you want to search and sort by, and click on "edit" next to it. Then make sure an appropriate "searcher" is selected. If you have existing data for the field and you change or set a new searcher, you will need to re-index to make the search and sort work.

What is a subquery in JQL?

Subqueries allow you to create complex JQL queries that normally require creating more than one query and possibly some manual copy and paste operations. They can free you from Excel for a number of tasks. They are easy to use thanks to support for autocompletion.


1 Answers

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
like image 184
Andrew Fogg Avatar answered Sep 21 '22 20:09

Andrew Fogg