🚀 Effective since April 2020 and JWT version 2.9.0 Automation Toolbox for Jira is fully integrated into our top rated app Jira Workflow Toolbox (JWT)🚀

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Syntax

Only two values will be accepted / returned: true and false .

Logical operators

The following logical operators can be used for linking logical terms in an expression, i.e., terms that return a boolean value type (true or false).

Operator

Meaning

Precedence

NOT or !logical negation1 (highest)
AND or &logical conjunction2
OR or |logical disjunction3
XORexclusive or, i.e., a XOR b is equivalent to a AND !b OR !a AND b3
IMPLIES or IMPlogical implication, i.e., a IMPLIES b is equivalent to !a OR b4
XNOR or EQVlogical equivalence, i.e., a EQV b is equivalent to a IMPLIES b AND b IMPLIES a4 (lowest)

Logical connectives are case insensitive, i.e., they can also be written in lower case: or, and, not, xor, implies, imp, eqv and xnor .

Conditional operator: ? :  (IF, THEN, ELSE)

The conditional operator ? : is a powerful operator to construct conditional expressions.

The conditional operator basically allows you to construct the following expression: IF boolean_expression true THEN term_1  ELSE term_2.
  • Format: <boolean_expression> ? <term_1> : <term_2> 
    where <term_1> and <term_2> are terminus of the same type (boolean, number, string, issue list, string list or number list).

Examples of using the conditional operator

ExpressionOutput
{...duedate} != null ? ({...duedate} - {...currentDateTime}) / {HOUR} : 0If the Due Date  is not null, this function will return the number of hours from the current date-time to Due Date, otherwise it will return 0 .
timePart({...currentDateTime}, LOCAL) > 21:00 AND timePart({...currentDateTime}, LOCAL) < 7:00 ? "Night" : "Day"If the current time is between 21:00 and 7:00 this function will return "Night", otherwise it will return "Day" .