JQL Extension

On this page:

What is "extended JQL syntax"?

With Issue Matrix for Jira Cloud, you can create objects called JQL-type matrices to search for issues using Jira's advanced JQL search syntax. Later these issues are listed in a separate Issue Matrix panel in the issue view in Jira's UI.

We've added an extension to that standard JQL syntax, similar to the extended JQL feature in the Issue Matrix for Jira server/DC app.

You can use the extended syntax in JQL-type Issue Matrices and in the additional filter JQL in Sub-task, Epic, and Issue Links matrices.

Learn more about the additional JQL filter you and your users can use in Sub-task, Epic, and Issue Links matrices.

The extension allows you to filter the issues that will be included in the Issue Matrix panel according to the current issue. In particular, with the additional syntax, you can compare a given custom field’s value in the current issue with its values in other issues.

For example, you might want to view all issues from the same project reported by the current issue's reporter. So you can see that with this tool we've given you, your Issue Matrices become much more dynamic and flexible. You have a different list of issues curated according to the issue you're currently viewing.

How to use it?

Our JQL extension allows you to:

  • Compare system field values in issues with current issue’s values.

  • Compare custom field values in issues with current issue’s values.

We’re giving you specific JQL syntax rules to achieve these cases.

Before proceeding with our extended JQL syntax, keep in mind that we follow entirely Jira’s JQL syntax principles and rules. Below you’ll find more information on Jira’s JQL basics.

Jira’s JQL syntax for advanced issue searching

Issue Matrix for Jira Cloud’s extended JQL syntax follows Jira's JQL syntax rules and guidelines. To check Jira’s advanced searching and JQL syntax rules, visit the following Atlassian documents:

A simple query in JQL (also known as a “clause”) consists of a field, followed by an operator, followed by one or more values or functions like:

 

Comparing system fields

Syntax for system fields

You can use the following syntax to get the value of a given system field in the issue the user is currently viewing:

${currentIssue.assignee}

You can use this syntax to build a query that will allow you to search for all issues with the same value for a system field as in the current issue like:

assignee = ${currentIssue.assignee}

See the supported system fields and their syntax with examples in the JQL extension for system fields guide.

You can learn how to compare system field values in JQL query mode from the examples below:

  1. To find all issues in the Documentation project for which the reporter is the same as the assignee of the current issue, you can use the following extended syntax:
    project = "Documentation" and reporter = ${currentIssue.assignee}

  2. To find all issues which are linked to the current issue and are in the Open status, you can use the following extended syntax:
    issue in linkedIssues(${currentIssue.key}) and status = Open

Comparing custom fields

You can learn how to compare custom field values in JQL Query mode from the examples below:

  1. To find all issues with same Customer Request Type like the current issue:
    "Customer Request Type" = ${currentIssue.cf["Customer Request Type"]}

  2. Same as above with the custom field ID:
    "Customer Request Type" = ${currentIssue.cf[10001]}

Empty fields

If a given field has no value, then a comparison query with the extended JQL syntax will return all issues for which the same field does not have a value as well. If this is undesired, use an "IS NOT EMPTY" clause in your JQL query:
assignee = ${currentIssue.assignee} and assignee is not empty

System fields

This section lists examples of extended JQL syntax for configuring Issue Matrix panel that will display all other issues with the same value(s) in a given system field as in the current issue, as well as all issues with empty values in that system field:

  • Fix Version/s
    fixVersion in (${currentIssue.fixVersion}, EMPTY)

  • Affects Version/s
    affectedVersion in (${currentIssue.affectedVersion}, EMPTY)

  • Labels
    labels in (${currentIssue.labels}, EMPTY)

  • Component/s
    component in (${currentIssue.component}, EMPTY)

Custom fields

This section lists JQL syntax examples that allow having an Issue Matrix panel listing all other issues with the same labels/multi-version picker custom field value(s) as in the current issue.

These JQL queries' results will also include the issues with empty values in the labels and multi-version picker fields.
Labels custom field type is "com.atlassian.jira.plugin.system.customfieldtypes:labels", and multi version picker custom field type is "com.atlassian.jira.plugin.system.customfieldtypes:multiversion".

  1. Filter issues by custom field ID:
    "Profession labels" IN (${currentIssue.cf[10005]}, EMPTY)

  2. Filter issues by custom field name:
    "Profession labels" IN (${currentIssue.cf["Profession labels"]}, EMPTY)

Service Management use cases

In this section, you can find use cases where the JQL extension compares issue fields with the values stored in the currently viewed issue from a Service Management project.

The examples demonstrate how you can benefit from using the JQL extension. Visit the JQL matrix documentation to learn how to create a JQL-type Issue Matrix with an extended JQL syntax for comparing Service Management fields.

Tickets by current issue’s reporter

You can use the following JQL entry to find and list all other tickets by the current ticket’s reporter:
reporter = ${currentIssue.reporter}

Tickets in current issue’s organizations

You can use the following JQL entry to display all tickets associated with one of the organizations in the current issue:
Organizations in (${currentIssue.cf["Organizations"]})

Tickets of current issue’s request type

You can use the following JQL entry to find and list all tickets of the same request type as the current ticket:
"Request Type" = ${currentIssue.cf["Request Type"]}