You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

What are Jira expressions?

Only used in validators and conditions!

Jira expressions look and feel like regular parser expressions provided by JWT for Jira Cloud but are based on domain-specific language designed and provided by Atlassian with Jira in mind, evaluated on the Jira Cloud side. They can be used to evaluate custom code in the context of Jira entities. Jira expressions follow JavaScript syntax and can be thought as a JavaScript dialect. See the introduction section from the offical documentation here

Where are Jira expressions used in JWT for Jira Cloud?

Jira Workflow Toolbox for Jira Cloud supports the usage of Jira expressions within its Jira expression condition and Jira expression validator

In order to illustrate providing a simple example, an expression like

issue.assignee != null

would ensure that the current issue is currently assigned to a Jira user.

What's the difference to parser expressions?

While looking quite similar most of the time, it's important to know that Jira expressions and our parser expressions have nothing in common in the background. The parser expressions equivalent to our former example would read

%{issue.assignee} != null

Apparently, one of the main differences to Jira expressions is the way fields are referenced: in parser expressions, field values can be referenced by field codes that are always led by a percentage sign, written between curly brackets, e.g. %{your.field.code.here}

Why do I need both?

Right now, Jira expressions are the only officially supported way to formulate custom conditions or validators in Jira Cloud.

Being the 'brain' of Jira Workflow Toolbox for Server and Data Center, its expression parser has evolved from a small set of handy functions to a comprehensive list and a fundamental part of this app over the years. Therefore it was only obvious to make this core functionality available for Jira Cloud as well, Like in the Server and Data Center version, it's widely used to compose texts using virtual fields or to extend our post functions by conditional executions using logical expressions.

Where do I start?

To ensure that you have a quick and easy entry into the world of Jira expressions, we have prepared a comprehensive list of use cases.

What else should I know?

Jira expressions follow certain constraints with regard to evaluating (see the official documentation).

While the limits should be high enough not to interfere with any intended usage, it's important to realize that they do exist:

  • Expression length is limited to 1,000 characters or 100 syntactic elements.
  • Expression can execute at most 10 so-called expensive operations, i.e. those that load additional data, such as entity properties, comments, or custom fields.
    ? Example ?
  • No logging




reference to Jira expression types (https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference/)
reference to Jira expression documentation (https://developer.atlassian.com/cloud/jira/platform/jira-expressions/)


Griffbereite Beispielausdrücke:
https://jodocus.atlassian.net/wiki/spaces/CWD/pages/49315902/Using+Jira+Expressions


Ausführliche Doku JMWE:
https://innovalog.atlassian.net/wiki/spaces/JMWEC/pages/1007419470/How+to+insert+information+using+Jira+expressions