REST API rest/api/2/issue/picker returns no results when using current search (currentJQL)

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

We cannot find certain issues via the rest/api/2/issue/picker when using parameters endpoint unless the issue has been recently visited.

Reference: https://docs.atlassian.com/software/jira/docs/api/REST/9.12.2/#api/2/issue-getIssuePickerResource

Environment

Jira Software 9.12.1

Diagnosis

This is an example for an issue TEST-1234; This issue was not visited by the user running the API.

Visit "jirahost.com/rest/api/2/issue/picker?currentJQL=ORDER BY priority DESC, updated DESC&query=TEST-1234" in the browser

Receive the following response:

1 {"sections":[{"label":"History Search","id":"hs","msg":"No matching issues found","issues":[]},{"label":"Current Search","id":"cs","msg":"No matching issues found","issues":[]}]}

It is expected that the issue is not listed in the History Search portion of the response, as it has not recently been visited. However it should show up in the Current Search portion of the response.

If the user opens issue TEST-1234 and run the API again it will return under History Search but not under Current Search.

Cause

This happens when you have the option "Disable empty JQL queries" turned ON on Jira General Settings.

This property was introduced by this feature request: As an JIRA Administrator I want to make empty JQL return no data

It states:

The new functionality allows Jira admins to choose how an empty JQL query behaves: either returning no results at all (ON), or all existing issues (OFF). We've introduced this option to avoid performance issues with empty filters returning all existing issues in your instance. The default state is OFF, since some plugins may be using empty JQL queries on purpose.

An empty JQL query in Queues, SLAs and Reports within JIRA Service Desk will continue to return all issues per project.

Solution

Turn OFF "Disable empty JQL queries" option:

  • This is set under Administration > System > General Settings.

ℹ️ The default value for this setting is "OFF".

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.