Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

How to use placeholders for JQL in JSU

Atlassian's Jira Query Language (JQL) allows you to perform advanced searching in Jira's search dialog. JSU extends JQL with additional placeholders, which are replaced with the values of the current issue in transition.

For example, if you configure the following JQL query in a configuration screen of JSU:

...

Configuration in JSU
Code Block
parent = {issue.Parent} AND component != {issue.Component/s} OR component is EMPTY 

it will be converted by JSU before the search is executed similar to the following:

...

Values after replacement
Code Block
parent = 'ABC-123' AND component != 'Documentation' OR component is EMPTY 

This will search all sibling issues (same parent), which do not have the same component as the current issue (in this example Documentation).

Any text in curly brackets, which follows the pattern {issue.FIELD NAME} is replaced with the value of that field on the current issue (the issue in transition). See below for further details on which names you can use for the different field types. Depending on your use case, you might not use any {issue.FIELD NAME} placeholder at all.

Logical operators, functions, and operators are the same as the JQL in Jira. It is important to use the correct JQL syntax. The easiest way to write a JQL query for JSU is to prepare it first in Jira's standard search interface (use 'advanced search') with some sample value, then copy it to JSU configuration and replace some of your sample values with {issue.FIELD NAME} as required.

See JQL Use Cases for more examples.

Anchor
toptips
toptips
Our tips for using JQL with JSU

...

Code Block
... AND parent = {issue.parent} AND key != {issue.key}
  • sub-tasks with the same parent: parent = {issue.parent}

  • excluding the current issue: key != {issue.key}

See JQL Use Cases for more examples.

...

System field names should be the same as those used in JQL. For example:

  • reporter

  • assignee

  • issuetype

  • priority

Custom fields

Custom field names should be the same as those used in JQL. For example:

  • Approver or  cf[10010]

  • Hosting Server or cf[12910]

  • Date to Join or cf[11000]

(info) If you have several custom fields with the same name, you can only use the cf[12345] notation to refer to one of them.

Syntax for values of the current issue

The replaceable value from the issue must be between curly brackets:

Code Block
{issue.FIELD NAME}

System fields

Use the place holders from the following list:

  • {issue.Affects Version/s}

  • {issue.Assignee}

  • {issue.Affects Version/s}

  • {issue.Assignee}

  • {issue.Component/s}

  • {issue.Created}

  • {issue.Creator}

  • {issue.Customer Request Type}

  • {issue.Description}

  • {isseu.Due Date}

  • {issue.Environment}

  • {issue.Epic Color}

  • {issue.Epic Name}

  • {issue.Epic Status}

  • {issue.Epic Link}

  • {issue.Fix Version/s}

  • {issue.Issue Key}

  • {issue.Issue Type}

  • {issue.Labels}

  • {issue.Original story points}

  • {issue.Parent}

  • {issue.Priority}

  • {issue.Project}

  • {issue.Rank}

  • {issue.Reporter}

  • {issue.Request participants}

  • {issue.Resolution}

  • {issue.Resolved}

  • {issue.Security Level}

  • {issue.Sprint}

  • {issue.Status}

  • {issue.Summary}

  • {issue.Time to resolution}

  • {issue.Updated}

  • {issue.Voters}

  • {issue.Watchers}

  • {issue.Work Ratio}

Alternatively, you might use the technical field ID of a system field, or how JQL refers to it. For example, all three variants below refer to the same field:

  • {issue.Affects Version/s}
    Label in the English Jira user interface.

  • {issue.versions}
    Technical field ID. See also the constant values reference from Atlassian.

  • {issue.affectedVersion}
    JQL's method to refer to that field.

Custom fields

You can use either the name of a custom field or its ID. For example:

  • {issue.My Text Field}

  • {issue.customfield_12345}

However, the cf[12345] notation is not supported between curly brackets.

...