Page History
Page properties | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
UI Text Box | ||||
---|---|---|---|---|
| ||||
The JWT expression parser accepts the most common comparison operators as well as logical operators . The main purpose of these operators is to construct complex logical comparisons by linking individual expressions. |
Excerpt | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Comparison operatorsThe operators, their meaning and the applicable data types you can use them with are listed below.
Logical operatorsThe table below lists all logical operators that can be used for linking logical terms in an expression. Logical operators take logical terms (which return
Conditional operatorThe conditional operator It basically allows you to construct the following expression: IF logical_expression
|
List operators
Page properties report | ||||||
---|---|---|---|---|---|---|
|
UI Expand | |||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
If you use multiple operators in a single expression, they will follow a certain order in which they are processed or a precedence.
|
UI Text Box | ||
---|---|---|
| ||
|
Excerpt Include | ||||||
---|---|---|---|---|---|---|
|
hidden | true |
---|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||
---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
UI Text Box | ||||
---|---|---|---|---|
| ||||
The JWT expression parser accepts the most common comparison operators as well as logical operators . The main purpose of these operators is to construct complex logical comparisons by linking individual expressions. |
Comparison operators
The operators, their meaning and the applicable data types you can use them with are listed below.
UI Text Box | ||||||
---|---|---|---|---|---|---|
| ||||||
A comparison always returns a
|
title | Overview of all case-sensitive comparison operators |
---|
UI Text Box | ||
---|---|---|
| ||
All operators respect the case of the characters. |
true
) =
Code Block | ||||
---|---|---|---|---|
| ||||
1=1
true = true
[1, 2, 3] = [1, 2, 3]
["blue", "red", "green"] = ["blue", "red", "green"] |
UI Text Box | ||
---|---|---|
| ||
When working with Lists, each elements' existence and its order are being evaluated. |
!=
Code Block | ||||
---|---|---|---|---|
| ||||
0 != 1
"HELLO" != "Hello"
%{issue.description} != "Hello"
true != false
[1, 2, 3] != [1, 3, 2]
["blue", "red", "green"] != ["blue", "green", "red"] |
UI Text Box | ||
---|---|---|
| ||
When working with Lists, each elements' existence and its order are being evaluated. |
<
Code Block | ||||
---|---|---|---|---|
| ||||
1 < 2
"abc" < "bbc"
"abc" < "abcd" |
>
Code Block | ||||
---|---|---|---|---|
| ||||
2 > 1
"bbc" > "abc"
"abcd" > "abc" |
<=
Code Block | ||||
---|---|---|---|---|
| ||||
3 <= 3 |
>=
Code Block | ||||
---|---|---|---|---|
| ||||
"Hello world! Hello *" >= "Hello world" |
~
Code Block | ||||
---|---|---|---|---|
| ||||
"Hello world!" ~ "world" #true. The text "world" is contained in the first text.
%{issue.components.leads} ~ %{system.currentUser} #checks whether "Component leads" contains the "Current user".
[1, 2, 3, 2, 2, 4] ~ [2, 1, 2] #true
["blue", "red", "green", "red", "white", "red"] ~ ["red", "green", "red"] #true
["green", "red"] ~ ["red", "green", "red"] #false |
!~
Code Block | ||||
---|---|---|---|---|
| ||||
"world" !~ "Hello world!" #false. The text "world" is contained in the first text.
%{issue.fixVersions} !~ %{issue.versions} #false if all "Affects version/s" are also selected as "Fix version/s".
[1, 2, 3, 2, 2, 4] !~ [2, 1, 1, 4] #true
["blue", "red", "green", "red", "red"] !~ ["red", "green", "green", "red"] #true |
in
Code Block | ||||
---|---|---|---|---|
| ||||
"world" in "Hello world!" #true. The text "world" is contained in the first text.
%{system.currentUser} in %{issue.components.leads} #true if current user is a component lead of any of the issue's components
[1, 1, 2] in [2, 1, 1, 1, 4] #true
["blue", "red", "red"] in ["red", "green", "blue", "red", "red"] #true
2 in [1, 2, 3] #true
"blue" in ["red, "blue", "white"] #true |
not in
Code Block | ||||
---|---|---|---|---|
| ||||
"Hello world!" not in "world" #true
%{issue.versions} not in %{issue.fixVersions} #false if all "Affects version/s" are also selected as "Fix version/s".
[1, 1, 2, 2] not in [2, 1, 1, 1, 4] #true
["blue", "red", "red", "blue"] not in ["red", "blue", "red", "red"] #true
5 not in [1, 2, 3, 3, 4] #true
"orange" not in ["blue", "red", "white"] #true |
any in
Code Block | ||||
---|---|---|---|---|
| ||||
%{issue.versions} any in %{issue.fixVersions} # true if any selected "Affects version/s" has also been selected as "Fix version/s".
[1, 3] any in [3, 4, 5] #true
["blue", "white"] any in ["black", "white", "green"] #true |
none in
Code Block | ||||
---|---|---|---|---|
| ||||
%{issue.versions} none in %{issue.fixVersions} #true if no selected "Affects version/s" has also been selected as "Fix version/s".
[1, 2] none in [3, 4, 5] #true
["blue", "red"] none in ["black", "white", "green"] #true |
type | tip |
---|
When comparing lists, the exact number of occurence (cardinality) per element must match.
Code Block | ||||
---|---|---|---|---|
| ||||
["blue", "red", "green", "red", "white", "red"] ~ ["red", "green", "red"] |
true
true
, since the element (text) red appears at least twice in the first list and the element (text) green occurs at least once in the first list.Code Block | ||||
---|---|---|---|---|
| ||||
["green", "red"] ~ ["red", "green", "red"] |
false
false
, since the element (text) red does not appear twice in the first list. title | Overview of all case ignoring comparison operators |
---|
type | info |
---|
All operators ignore the case of the characters.
true
) =~
Code Block | ||||
---|---|---|---|---|
| ||||
"HELLO" =~ "Hello" #true
"up" =~ "UP" #true
["blue", "red", "green"] =~ ["Blue", "RED", "Green"] #true |
!=~
Code Block | ||||
---|---|---|---|---|
| ||||
" HELLO" !=~ "Hello" #false, since there is a whitespace in the first text
"up" !=~ "down" #true
("up" !=~ "UP") #false
["blue", "red"] !=~ ["Blue", "green"] #true
["blue", "red"] !=~ ["Red", "BLUE"] #true
["blue", "red", "green"] !=~ ["Blue", "RED", "Green"] #false |
~~
Code Block | ||||
---|---|---|---|---|
| ||||
"Hello World!" ~~ "world" #true, checks whether a text contains a substring.
"A small step for a man" ~~ "STEP" #true
["one", "two", "three"] ~~ ["TWO", "One"] #true, checks whether a text list contains all the elements of another text list. |
!~~
Code Block | ||||
---|---|---|---|---|
| ||||
"Hello World!" !~~ "bye" #true, checks whether a text does not contain a substring.
"A small step for a man" !~~ "big" #true
["one", "two", "three"] !~~ ["Four"] #true, checks whether a text list does not contain a single element of another text list.
(["one", "two", "three"] !~~ ["TWO"]) = false |
in~
Code Block | ||||
---|---|---|---|---|
| ||||
"world" in~ "Hello World!" #true, checks whether a substring is contained in another text.
"STEP" in~ "A small step for a man" #true
["TWO", "One"] in~ ["one", "two", "three"] #true, checks whether all the elements of a text list are contained in another text list. |
not in~
Code Block | ||||
---|---|---|---|---|
| ||||
"bye" not in~ "Hello World!" #true, checks whether a substring is not contained in another text.
"big" not in~ "A small step for a man" #true
["Four"] not in~ ["one", "two", "three"] #true, checks whether any of the elements of a text list are not contained in another text list.
["TWO"] not in~ ["one", "two", "three"] #false |
any in~
Code Block | ||||
---|---|---|---|---|
| ||||
["blue", "violet"] any in~ ["Blue", "Red", "Green"] #true
["Five", "One"] any in~ ["FOUR", "FIVE", "SIX"]"bye" #true |
none in~
Code Block | ||||
---|---|---|---|---|
| ||||
["Orange"] none in~ ["red", "blue", "green"] #true, checks whether none of the elements of a text list are not contained in another text list.
["orange"] none in~ ["Red", "Orange"] #false |
title | Applicable data types |
---|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status subtle true title number list
Status subtle true title text list
Status | ||||
---|---|---|---|---|
|
=
!=
<
>
<=
>=
~
!~
in
not in
any in
none in
=~
!=~
~~
!~~
in~
not in~
any in~
none in~
title | Things to be aware of |
---|---|
type | info |
Please be aware the both operands of the respective comparison must have the same data type. The only exceptions are the following:
Automatic casting fromStatus | ||||
---|---|---|---|---|
|
~, !~, in
and not in
can be used for checking a single element (Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
null
.title | Things to remember |
---|
~, !~, in
and not in
can be used for checking a single element (Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Code Block | ||||
---|---|---|---|---|
| ||||
1 in [1, 2, 3]
["blue", "red"] ~ "blue" |
~, !~, in
and not in
when used with a text are useful to look for substrings in another string.Code Block | ||||
---|---|---|---|---|
| ||||
"I love coding" ~ "love"
"I don't like Mondays" !~ "Fridays"
"love" in "I love coding"
"Fridays" not in "I don't like Mondays" |
~, !~, in
and not in
respect cardinality, i.e., container list must have at least the same number of elements as contained list.Code Block | ||||
---|---|---|---|---|
| ||||
[1, 1] in [1, 1, 1]
[1, 1] not in [1, 2, 3] |
=
and !=
, when used for comparing lists, require to have the same elements, with the same cardinality and the same order.Code Block | ||||
---|---|---|---|---|
| ||||
[1, 2, 3] = [1, 2, 3]
[4, 5, 6] != [4, 6, 5] |
Operators <, >, <=
and >=
work according to lexicographical order when comparing text.
Code Block | ||||
---|---|---|---|---|
| ||||
1 < 2
"abc" < "bbc"
"abcd" > "abc" |
Logical operators
The table below lists all logical operators that can be used for linking logical terms in an expression.
Logical operators take logical terms (which return
Status | ||||
---|---|---|---|---|
|
- a boolean value
- a JWT expression parser function returning a boolean value
- a comparison
- a logical term enclosed by brackets ()
- two logical terms connected with a logical operator, where boolean literals and comparisons themselves are logical terms.
UI Text Box | ||
---|---|---|
| ||
Logical operators can only be used in logical expressions in the Logical mode or in combination with the conditional operator. |
title | Overview of all logical operators |
---|
Operator
Meaning
Precedence
NOT
or !
AND
or &
OR
or |
XOR
a XOR b
is equivalent to a AND !b OR !a AND b
IMPLIES
or IMP
a IMPLIES b
is equivalent to !a OR b
XNOR
or EQV
a EQV b
is equivalent to a IMPLIES b AND b IMPLIES a
UI Text Box | ||
---|---|---|
| ||
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. Logical operators can also be written in lower case (e.g. |
Conditional operator
The conditional operator ? :
is a powerful operator to construct conditional expressions.
It basically allows you to construct the following expression: IF logical_expression true
THEN term_1 ELSE term_2.
Code Block | ||
---|---|---|
| ||
<logical_expression> ? <term_1> : <term_2> |
UI Text Box | ||
---|---|---|
| ||
The conditional operator is extremely helpful when being used in calculated fields. |
title | Examples of using the conditional operator |
---|
Code Block | ||
---|---|---|
| ||
%{issue.priority} = "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 "Please have a look at this issue immediately"
ELSE it will return "No stress, come back later".
Code Block | ||
---|---|---|
| ||
{issue.duedate} != null ? ({...duedate} - {...currentDateTime}) / {HOUR} : 0 |
IF an issue does have a due date set (due date is not null),
THEN this function will return the number of hours from the current date-time to the due date
ELSE it will return 0
.
Code Block | ||
---|---|---|
| ||
%{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 "Color",
ELSE it will return "No color".
Code Block | ||
---|---|---|
| ||
timePart({...currentDateTime}, LOCAL) > 21:00 AND timePart({...currentDateTime}, LOCAL) < 7:00 ? "Night" : "Day" |
IF the current time is between 21:00 and 7:00
THEN this function will return "Night" ,
ELSE it will return "Day".
List operators
Page properties report | ||||||
---|---|---|---|---|---|---|
|
title | Order of operations |
---|
If you use multiple operators in a single expression, they will follow a certain order in which they are processed or a precedence.
UI Text Box | ||
---|---|---|
| ||
|