On this page
Overview
Boolean expressions, or logical expressions, will always return or accept one of two distinct BOOLEANvalues: true
or false
.
Logical expressions, which can currently be used in the logical parsing mode are built using the following components:
- Basic elements
- Operators
- Expression parser functions
To ease into the logical expressions, we have prepared some examples on how you can construct more or less complex logical expressions.
A full list of examples can be found here.
Basic elementsNEEDS TECH REVIEW
The table below lists all simple elements or operands that can be used in a logical expression.
Element | Description | Example | Output value NEEDS TECH REVIEW |
---|---|---|---|
BOOLEAN | A boolean value of true or false | true, TRUE, false, FALSE | BOOLEAN |
TEXT | A quoted text or a text field code. | "This is a text" | STRING |
TEXT LIST | Text lists are enclosed by square brackets. Not only literals can be used as elements, but also field codes. | ["first element", "second element", %{issue.summary}] | STRING [] |
NUMBER | A numeric value or a numeric field code. | 3 | NUMBER |
NUMBER LIST | Number lists are enclosed by square brackets. Not only literals can be used as elements, but also field codes. | [5.1326, 3, 100000001, {issue.labels.length}] | NUMBER [] |
NULL | A specific value for comparisons if a field or another value is not set or equals null. | null | NULL |
TIME PERIOD | A specific time period: from SECOND to YEAR (in capital letters) in milliseconds | MINUTE, DAY, WEEK, MONTH | NUMBER |
WEEKDAY | The weekdays in capital letters (MONDAY -SUNDAY ) - internally represented by a number | TUESDAY | NUMBER |
MONTH | The months in capital letters (JANUARY-DECEMBER) - internally represented by a number | JUNE | NUMBER |
The operators, their meaning and the applicable data types you can use them with are listed below. A comparison always returns a BOOLEAN value. 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 BOOLEAN values) as operands and can thus be built using: Logical operators can only be used in logical expressions in the Logical mode or in combination with the conditional operator. The conditional operator It basically allows you to construct the following expression: IF logical_expression The conditional operator is extremely helpful when being used in calculated fields.Comparison operators
Logical operators
Conditional operator
?
:
is a powerful operator to construct conditional expressions.true
THEN term_1 ELSE term_2.<logical_expression> ? <term_1> : <term_2>
Jona Ittermann , Thorsten Letschert : Kleiner Mini-Screencast? Construct a logical expression (e.g. issue.priority = "High" OR xyz) AND count(subtasks()) >= 3 mit kurzer Einblendung der jeweiligen Elemente?