The logical parsing mode is used to construct logical expressions that will always return or accept one of two distinct values: true or false

It comes with defined syntax that allows you to write JWT expression parser functions.

The main JWT element where you will be using the logical parsing mode are:

Example expressions

Parser expressionDescription


3 < 5


This example returns:

true


3 > 5


This example returns:

false


"It is Monday"


This example returns:

true if it is actually Monday, false otherwise


Expressions can be combined or linked using operators to construct complex logical comparisons.


Parser expressionDescription


"It is Monday" AND "It is Sunday"


This example returns:

false

At least if you are looking at a single time zone.


"It is Monday" OR "It is Sunday"


This example returns:

true if it is either Monday or Sunday,  false otherwise



Parser expressionDescription


false


Simply returns false. You can use this expression for "switching off" a specific post function.


{parent.votes} > 5


A numerical comparison which returns true if the parent issue has more than 5 votes.


%{issue.assignee} = %{issue.project.lead} and %{issue.issueType} = "Bug"


(%{issue.assignee} = %{issue.project.lead}) and (%{issue.issueType} = "Bug")


A logical conjunction which takes two comparisons as operands.

It returns true when the assignee of the issue is the project lead and if it's a Bug.

The second expression has the same meaning but due to use of brackets may be more readable.


%{issue.assignee} = null


Returns true if the issue does not have an assignee. This expression uses the null value as an operator.


%{issue.priority} IN ["Blocker", "Critical"]

%{issue.priority} = "Blocker" OR %{issue.priority} = "Critical"


Returns true if the Priority has the value "Blocker" or "Critical". The first expressions uses a list whereas the second one uses single comparisons connected via the logical operator OR.


%{issue.issueType} = "Bug" IMPLIES %{issue.versions} != null


Returns true if Affects version/s is set whenever the issue type equals "Bug".


%{issue.priority} IN ["Blocker", "Critical", "Major"] IMPLIES (%{issue.assignee} != null AND %{issue.duedate} != null)


Returns true if Priority is "Blocker", "Critical" or "Major", the issue is assigned and Due date is set.


%{issue.labels} ~ ["Blocker", "Critical", "Major"]


Returns true if Labels (which is a field holding a ) contains "Blocker", "Critical" or "Major".



Logical expressions, which can currently be used in the logical parsing mode  are built using the following components:



Basic elements

The table below lists all simple elements or operands that can be used in a logical expression. 


ElementDescriptionExample

Output


A boolean value of true or false
true, TRUE, false, FALSE

A quoted text or a text field code.
"This is a text"

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}]

A numeric value or a numeric field code.
3

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 []

A specific value for comparisons if a field or another value is not set or equals null.
null

A specific time period: from SECOND to YEAR (in capital letters) in milliseconds
MINUTE, DAY, WEEK, MONTH

The weekdays in capital letters (MONDAY-SUNDAY) - internally  represented by a number 
TUESDAY

 

The months in capital letters (JANUARY-DECEMBER) - internally represented by a number 
JUNE



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?





Short descriptionCompose logical expressions using field codes and JWT expression parser functions.
Supported elements
Output





Status
Tech review

Style guide