JQL Functions
What are JQL Functions?
The Enhanced Search for Jira Cloud app provides advanced JQL function search capabilities, or queries, in Jira Cloud.
These extend Jira's built-in capabilities and enable you to conduct searches with greater granularity, including much more detailed information about what is happening in your instance and projects. For example, the linkedIssuesOf function will return issues of a certain type based on a subquery you give it.
Custom field name duplicates
If you have custom fields with the same name as Jira default fields, Enhanced Search will prioritise Jira’s default fields during searches. We recommend renaming your custom fields before using them in search queries, as Jira’s default fields will always be used instead of custom fields with the same name.
Enhanced Search features several JQL functions not available as default in Jira, which are documented within this section.
There are two ways to insert functions into your Enhanced Search JQL queries. Add functions either by typing into the text field or by clicking Insert Function.
If you are new to Enhanced Search, we recommend you start by using the Insert Function option.
Available Fields
Functions can be customised in many ways, and search a variety of fields in Jira. Make a request to the Jira Cloud REST API to see all fields you can use inside of the function expressions. For example, customfield_10024
or priority.id
.
https://your-Jira.atlassian.net/rest/api/2/issue/{issueIdOrKey}?expand=schema
Subqueries
Most of the functions require a JQL 'subquery' as the starting point for the function you’ve selected. Providing an empty string (e.g. "") causes the query to match each issue in your Jira instance, making your query very inefficient.
User-specific data is not supported in subqueries. So statements such as assignee - currentuser()
are invalid.
Insert Function
We have provided the Insert Function option to help new users generate the correct JQL for their query.
After clicking the '+' Insert Function, the Insert Functions and Users window opens. A list of available functions is shown on the left. Select a function from the list to be presented with a form you can fill in to generate valid JQL for that function.
Most of the functions require a JQL 'subquery' that is used as the starting point for the function you’ve selected. For example, entering the subquery "project = example"
tells the linkedIssuesOf
function that it should find issues linked to the Example project.
After filling in all required fields on the form, click Add to Query to add the relevant query clause to the end of your existing search query.
When your query has been added, click the Search for Issues icon.
Text Field
More advanced users can type their JQL query directly into the JQL query text field. Alternatively, you can use the text field to make small edits to a JQL created using the Insert Function feature, such as quickly changing the project name.
Operators
Enhanced Search uses the in
and not in
operators for all JQL functions. You can also use some additional operators for the Date Function.
Troubleshooting Tips
Space required after comma
Occasionally you may see a red X show up next to your filter; this indicates an issue with the filter.
Check the filter for mistakes. In this example, a project name has not been specified. A correctly configured filter displays a green checkmark.
For more information on how to configure JQL queries, see the Atlassian Advanced Searching documentation. You can also check our Troubleshoot Enhanced Search for Jira Cloud guidance.