Jira expressions follow technically speaking the JavaScript syntax. The most common information concerning operators is listed below. To learn more about, please refer to the
official documentation
.
Comparison operators
The operators, their meaning and the applicable data types you can use them with are listed below.
A comparison always returns a boolean value.
Overview of all case-sensitive comparison operators
All operators respect the case of the characters.
|
Operator |
Meaning |
Examples (all examples return |
|---|---|---|
|
|
equal to |
Bash
|
|
|
not equal to |
Bash
|
|
|
less than |
Bash
|
|
|
greater than |
Bash
|
|
|
less than or equal to |
Bash
|
|
|
greater than or equal to |
Bash
|
Logical operators
The table below lists an example set of logical operators that can be used for linking logical terms in an expression.
They take logical terms (which return boolean values) as operands and can thus be built using:
-
a boolean value
-
a comparison
-
a logical term enclosed by brackets ()
-
two logical terms connected with a logical operator, where boolean values and comparisons themselves are logical terms.
Overview of all logical operators
|
Operator |
Meaning |
Precedence |
|---|---|---|
|
|
logical negation |
1 (highest) |
|
|
logical conjunction |
2 |
|
|
logical disjunction |
3 |
A single logical term can be enclosed by brackets () in order to increase the readability of the expressions or to define a precedence which differs from the given one.
Conditional operator
The conditional operator, ?-operator, is a powerful one to construct conditional expressions.
<logical_expression> ? <term_1> : <term_2>
Examples of using the conditional operator
|
Expression |
Description |
|---|---|
|
|
IF the priority of an issue is Blocker, THEN this function will return the text "Please have a look at this issue immediately" ELSE it will return the text "No stress, come back later". |
|
|
IF a custom field (e.g. a select list) has a value of Red, THEN this function will return the text Color, ELSE it will return No color. |
|
|
IF the current time is between 21:00 and 7:00 THEN this function will return the text "Night" , ELSE it will return the text "Day". |