On this page |
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 official documentation here. |
JWT for Jira Cloud supports the usage of Jira expressions within its Jira expression condition and Jira expression validator.
In order to illustrate with a simple example, a Jira expression like
issue.assignee != null |
would ensure that an issue is currently assigned to a Jira user.
While they might look the same, it's important to know that Jira expressions and our parser expressions have nothing in common in the background. The parser expression 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}
Rule of thumb! Not sure what the specific example you come across in our documentation is about? |
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. As in the Server and Data Center version, it is widely used, e.g. to compose texts using virtual fields or to extend our post functions by conditional executions using logical expressions.
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.
Once you're ready to compose your own expressions, please see our fields used in Jira expressions overview to see which possibilities exist in order to query (issue) field values.
Jira expressions follow certain constraints with regard to the evaluation of those expressions (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 can execute a maximum of 10 so-called "expensive" operations, i.e. those that load additional data, such as entity properties, comments, or custom fields, e.g.
Given an expression to check whether every sub-task has at least one comment containing an issue key, will fail if this issue has more than 10 sub-tasks.
Expression | Error message | |
---|---|---|
|
Where to find additional ressources?