Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


UI Text Box
sizemedium
typeinfo

The logical parsing mode is 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

Currently the only place where you can use the logical mode is the conditional execution parameter in Post functions.

Compared to the General mode, the logical parsing mode is quite more powerful since next to field codes and JWT expression parser functions it also supports the most common Operators (JWT expressions) which can be used to compare values

Example expressions

Parser expressionDescription


Code Block
linenumberstrue
3 < 5


This example returns:

true


Code Block
linenumberstrue
3 > 5


This example returns:

false


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

Parser expressionDescription


Code Block
linenumberstrue
3 < 5 AND 7 > 5


This example returns:

true


Code Block
linenumberstrue
%{issue.assignee} = %{issue.reporter}


This example returns:

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


Excerpt


UI Expand
titleAdditional 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".




UI Text Box
typetip

In the logical parsing mode only field codes have to be enclosed by %{} and {} respectively. JWT expression parser functions can be used without enclosing brackets.



Excerpt Include
Operators (JWT expressions)
Operators (JWT expressions)
nopaneltrue


Page properties
hiddentrue


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

Status
subtletrue
titleboolean