Writing Jira expressions

Press Ctrl + Space anywhere inside Jira expression field to get suggestions including available context variables, properties and methods.

How does it work?

Start writing expression by typing issue or any other available context variable. You can access any properties or methods of an issue using . notation. Press Ctrl + Space inside the editor to get all possible members you can access. For example, to read the assignee of the issue, type: issue.assignee. Custom fields can be accessed by field id: issue.customfield_10036.

The next step is to use one of the comparison operators: ==, !=, <, >, <=, >= followed by a value. For example, in order to check if an issue is assigned, use: issue.assignee != null.

Each member has its own type and properties. To check that Jane Doe is assigned to the issue, type: issue.assignee?.displayName == "Jane Doe". Note that we used ?. notation to prevent syntax errors in case the assignee is null (type null does not have any properties).

All types are described in details in Jira expressions type reference.

Expression can be combined using || or && logical operators and even grouped with parenthesis. It is also possible to create local variables for clarity, e.g.

let versions = issue.versions || issue.fixVersions;
versions?.length > 1

Jira expressions use JavaScript-like syntax. They support a subset of JavaScript constructs and features which are described in details in Jira expressions documentation.

Check out more examples on the Jira expressions library page.

Last updated