Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Page properties
hiddentrue
Tech review

Status
colourGreen
titledone

Style guide

Status
colourGreen
titledone

Page status

Status
colourGreen
titledone

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged

UI Text Box
sizemedium
typeinfo

The logical parsing mode is mainly used in any conditional execution parameter of workflow post functions or genere.

It comes with defined syntax that allows you to write JWT expression parser functions to read and manipulate data from any issue in Jira.

The advanced text mode supports field codes as well as free text, written in quotation marks "".

Boolean expressions, or logical expressions, will always return or accept Boolean value

used to construct logical expressions.

To construct these logical expressions, you can combine different elements, such as field codes, JWT expression parser functions and operators. The result must always return one of two distinct

Status
subtletrue
titleboolean
values: true or false

Expand
titleSimple examples
Expression

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

Image Added

Image AddedExample expressions

Parser expressionDescription
Code Block
linenumberstrue
3 < 5

This example returns:

true

Code Block
linenumberstrue
3 > 5
false
Code Block
linenumberstrue
"It is Monday"
true if it is actually Monday, false otherwise

This example returns:

false


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

Expression


Parser expression
Boolean value
Description
Code Block
linenumberstrue
"It
3 
is
< 
Monday"
5 AND 
"It
7 
is
> 
Sunday"

false

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

This example returns:

true

Code Block
linenumberstrue
"It is Monday" OR "It is Sunday"
true if it is either Monday or Sunday, false otherwise

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

To ease into the logical expressions, we have prepared some examples on how you can construct more or less complex logical expressions. 
%{issue.assignee} = %{issue.reporter}

This example returns:

true if the current assignee has also reported the issue, false otherwise

Excerpt
UI Expand
title
Examples of simple logical expressions
Excerpt Include
Examples of logical expressionsExamples of logical expressions
nopaneltrue

A full list of examples can be found here.

Image RemovedBasic elements

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

Status
colourRed
titleNEEDS TECH REVIEW

UI Expand
titleAll elements that can be used in a logical expression
ElementDescriptionExample

Output value

Status
colourRed
titleNEEDS TECH REVIEW

Status
subtletrue
titleboolean

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

Status
colourGreen
titleboolean

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

Status
colourYellow
titlestring

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

Status
subtletrue
titlenumber

A numeric value or a numeric field code.
3

Status
colourBlue
titlenumber

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

Status
subtletrue
titlenull

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

Status
subtletrue
titlenull

Status
subtletrue
titletime period

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

Status
colourBlue
titlenumber

Status
subtletrue
titleweekday

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

Status
colourBlue
titlenumber

Status
subtletrue
titlemonth
 

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

Status
colourBlue
titlenumber

Excerpt IncludeOperatorsOperatorsnopaneltrue
Additional examples
Parser expressionDescription
Code Block
linenumberstrue
false
Simply returns false. You can use this expression for "switching off" a specific post function.
Code Block
linenumberstrue
{parent.votes} > 5

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

Code Block
linenumberstrue
%{issue.assignee} = %{issue.project.lead} and %{issue.issueType} = "Bug"
Code Block
linenumberstrue
(%{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.

Code Block
linenumberstrue
%{issue.assignee} = null

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

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

Code Block
linenumberstrue
%{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.

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

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

Code Block
linenumberstrue
%{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.

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

Returns true if Labels (which is a field holding a

Status
subtletrue
titletext list
) contains "Blocker", "Critical" or "Major".

Excerpt Include
Operators
Operators
nopaneltrue


Excerpt Include
DECADIS:Contact support
DECADIS:Contact support
nopaneltrue

Page properties
hiddentrue
Icon

Image Added

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?

true
Page properties
hiddenStatus
Tech review

Status
titletodo

Style guide

Status
titletodo

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
StatuscolourRedtitleflagged

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

Status
subtletrue
titletext

Page properties
hiddentrue

boolean