Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from this space and version 1.1.0


Excerpt

General Information

There are multiple parsing modes available in the expression parser. The two most commonly used parsing modes are:

  • Basic: with this simple parsing mode you can write free text and insert field codes with format %{...somefield} or %{...somefield.i} anywhere in your text. These field codes will be replaced at runtime with the corresponding field values of the issue currently being processed.
  • Advanced: with this parsing mode we can do much more complex text composition thanks to the usage of functions for replacing substrings, changing case, reading fields in linked issues, sub-tasks, JQL selected issues, and much more. It requires the text to be parsed to be written as string expression respecting the parser syntax.

You can easily switch between parsing modes. The available modes depend on the context!

Multimedia
nameswitching_parsing_mode.mp4
width700


Tip

Most functions will accept string values so casting values to string is a very powerful function. Details can be found below in the transforming converting data types section!
Additionally you can directly transform a field value to text using the following syntax: %{...somefield}

Parsing modes overview

ModeSupported featuresReturn typeExample
BasicField codes


Status
colourYellow
titlestring



The basic parsing mode supports the usage of field codes. Field codes can be used to access issue field values.

Panel
titlesimple text using a field code to read the summary

This is the issue summary: %{trigger.issue.summary}


Advanced

Field codes

Parser Functions

Status
colourYellow
titlestring

The advanced parsing mode has a defined syntax that allows you to write functions to read and manipulate data from any issue in Jira. Field codes are supported as well as clear text, written in quotation marks.

Panel
titleAdvanced expression to read the issue summary and use a function to get the assignee mail address

"This is the issue summary:" + %{trigger.issue.summary} + " and the assignee mail is: " + userEmail(%{trigger.issue.assignee})


Math/date time

Field codes

Parser Functions

Status
colourBlue
titlenumber
Status
colourGrey
titledate
Status
colourGrey
titledate_time

The mathematical and date time parsing mode works like the advanced mode but expect a number as result instead of a string. The resulting number is used to updated numeric or date time fields. In case of date or date time fields the number will be cast to a date.

Panel
titleTime to resolve the issue

{trigger.issue.resolutionDate} - {trigger.issue.createdDate}


Logical

Field codes

Parser Functions

Status
colourGreen
titleboolean

The logical parsing mode works like the advanced parsing mode but expression result must return true or false.

Panel
titleCheck if the assignee is equals the reporter

{trigger.issue.assingeeassignee} = {trigger.issue.reporter}


Issue List

Field codes

Parser Functions

Status
subtletrue
titleIssue []


String List

Field codes

Parser Functions

Status
subtletrue
colourYellow
titleString []


Mixed

Field codes

Parser Functions written in three curly braces

Status
colourYellow
titlestring




Info

Automatic parsing mode converter: You can write your text in basic mode, and then switch to advanced mode. The text to be parsed will be automatically rewritten as a string expression. Now, you can simply make the modifications you require, making use of text formatting functions, or inserting math or time expressions where needed.

To update issue fields the parsing result will be cast to the expected value e.g. a user name will be cast to a user to update a user field like the assignee field.




Div
styleline-height: 150%;
idtocContainer
classtocContainer


Panel
borderColor#333f48
bgColor#FFFFFF
titleColor#eeeeee
borderWidth1
titleBGColor#333f48
borderStylesolid
titleOn this page

Table of Contents
maxLevel3
minLevel2
indent20px
classp