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.

OperatorMeaningExamples (all examples return true)
== equal to
1==1
true == true
[1, 2, 3] == [1, 2, 3]
["blue", "red", "green"] == ["blue", "red", "green"]
!= not equal to
0 != 1
"HELLO" != "Hello"
true != false
[1, 2, 3] != [1, 3, 2]
["blue", "red", "green"] != ["blue", "green", "red"]
< less than
1 < 2
"abc" < "bbc"
"abc" < "abcd"
> greater than
2 > 1
"bbc" > "abc"
"abcd" > "abc"
<= less than or equal to
3 <= 3
>= greater than or equal to
"Hello world! Hello *" >= "Hello world"

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 negation1 (highest)
&&logical conjunction2
||logical disjunction3

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
ExpressionDescription
issue.priority.name == "Highest" ? "Please have a look at this issue immediately" : "No stress, come back later"

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".

issue.somefield == "Red" ? "Color" : "No color"}

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.

(new Date()).getHours() > 21:00 || (new Date()).getHours() < 7:00 ? "Night" : "Day"

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".


If you still have questions, feel free to refer to our support team.