JQL Extension

On this page:

Overview

Issue Matrix provides an extension to the JQL syntax which can be used to configure what to be displayed by an issue matrix custom field. The extension allows comparing issue fields with the values stored in the currently viewed issue.

This extension can be used in the Custom JQL mode and in the JQL filter configuration option in the Sub-Tasks, Issue Links and Epic modes.

Comparing system fields

Here are some examples of how to compare field values in "JQL Query" mode.

To find all issues in the TSP project for which the reporter is the same as the assignee of the current issue:

1 project = TSP and reporter = ${currentIssue.assignee}

To find all issues which are linked to the current issue and are in the Open status:

1 issue in linkedIssues(${currentIssue.key}) and status = Open

A complete reference for all supported system fields can be found in JQL extension for system fields.

Comparing custom fields

To find all issues with same Customer Request Type like the current issue:

1 "Customer Request Type" = ${currentIssue.cf["Customer Request Type"]}

Same as above with the custom field ID:

1 "Customer Request Type" = ${currentIssue.cf[10001]}

It is safer to search by custom field ID than by custom field name. It is possible for a custom field to have the same name as a built-in Jira system field; in which case, Jira will search for the system field (not the custom field). It is also possible for a Jira administrator to change the name of a custom field, which could break any saved filters that rely on that name. Custom field IDs, however, are unique and cannot be changed.

A complete reference for all supported custom field types can be found in JQL extension for custom fields.

Empty fields

If a given field has no value, then a comparison query 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:

1 assignee = ${currentIssue.assignee} and assignee is not empty

System fields

Extended JQL syntax for configurating Issue Matrix (JQL mode) that will display issues with the same value(s) as in the system custom field value(s) in the current issue as well as all issues with empty value in the system custom field:

  • Fix Version/s

1 fixVersion in (${currentIssue.fixVersion},EMPTY)"
  • Affects Version/s

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

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

1 component in (${currentIssue.component}, EMPTY)

Custom fields

JQL syntax examples for created by the admin custom fields of labels/multi version picker custom field type to display in Issue Matrix the issues with the same value(s) as in the created by the user labels/multi version picker field value(s) in the current issue as well as all issues with empty value in the labels field.

Labels custom field type: "com.atlassian.jira.plugin.system.customfieldtypes:labels"

Multi version picker custom field  type:  "com.atlassian.jira.plugin.system.customfieldtypes:multiversion"

by custom field ID:

1 "Profession labels" IN (${currentIssue.cf[10005]}, EMPTY)

 by custom field name:

1 "Profession labels" IN (${currentIssue.cf["Profession labels"]}, EMPTY)

Service Desk

In this section, you can find Service Desk use cases where the JQL extension is used for comparing issue fields with the values stored in the currently viewed issue. The examples demonstrate how you can benefit from using the JQL extension with the following Service Desk fields: Customer Request Type, Organizations and Reporter. Visit the JQL mode documentation to check how to configure the Service Desk fields comparisons.

With this feature, Service Desk agents can quickly assess the situation with a particular customer and find out if there are other open issues or not.

Customer Request Type

You can use the following JQL syntax to find and list all issues with the same "Customer Request Type" as the customer request type of the current issue:

1 "Customer Request Type" in (${currentIssue.customerRequestType})

Same Organization

You can use the following JQL syntax to find and list all issues associated with the same organizations as in the current issue:

1 Organizations in (${currentIssue.organizations})

Same Reported Issues

You can use the following JQL syntax to find and list all issues with the same reporter as in the current issue:

1 reporter = ${currentIssue.reporter}