Versions Compared

Key

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

Status
colourYellow
titleReady for review

Style guide

Status
colourYellow
titleReady for review

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

Excerpt
UI Text Box
sizemedium
typeinfo

parsing mode determines how the JWT for Jira Cloud expression parser interprets an expression. 

The available parsing modes depend on the context in which you use the expression.  This means for As an example, that only  only the Logical mode is available if you configure a conditionalexecution in a workflow post function.



Available parsing modes

Page properties report
headingsShort description, Supported elements, Output
cqllabel = "parsing_mode" and space = currentSpace() and ancestor = currentContent()


There are two parsing modes available in the expression parser:

  • General: you can write freetext, insert field codes or use functions anywhere in your text. Field codes will be replaced at runtime with the corresponding field values of the issue currently being processed. Using functions for replacing substrings, changing cases, reading fields in linked issues, sub-tasks, JQL selected issues, and much more we can do much more complex operations. It requires the text to be parsed to be written as a string expression respecting the parser syntax which is described below.

The available modes depend on the context!

Please be aware that besides the JWT for Jira Cloud expression parser you can choose to use Jira expressionsexpression mode as a parsing mode in every context.


UI Expand
titleParsing modes overview
ModeSupported featuresReturn typeExample
General

Field codes

Parser Functions

Text  with the following restriction: the following combination  of characters has to be escaped by "\" when not being used as a field code field codes:   %{  →  \%\{

Status
subtletrue
titletext

The general parsing mode allows you to write functions to read and manipulate data from any issue in Jira. Field codes are supported as well as clear text.

Code Block
languagebash
titlesimple text using a field code to read the summary
linenumberstrue
This is the issue summary: %{issue.summary}


Functions as well as Field codes have to be enclosed by %{...}. When you are nesting functions, only one %{...} is necessary. Within functions, texts have to be written in quotation marks. Quotes (") within a quoted text have to be escaped (e.g. "This is a \"quoted\" text" will result in This is a "quoted" text).

Code Block
languagebash
titleAdvanced expression to read the issue summary and use a function to get the assignee mail address
linenumberstrue
%{"This is the issue summary: " + %{issue.summary} + " and the assignee mail is: " + userEmail(%{issue.assignee.email})


Please be aware that the general mode always return a text. In case this is used as an input for a number (especially date) parameter or as an issue list, JWT for Jira Cloud cares internally for a correct conversion.


Code Block
languagebash
titleUse mathematical operations:: Time to resolve the issue
linenumberstrue
%{{trigger.issue.resolutionDate} - {trigger.issue.createdDate}}
Code Block
languagebash
titleWorking with issue lists: Getting the sub-tasks of an issue
linenumberstrue
%{subtasks()}
Code Block
languagebash
titleNesting functions: Getting the number of the sub-tasks of an issue
linenumberstrue
%{count(subtasks())}
Code Block
languagebash
titleMore complex example for a text which contains the current summary, the summary of the parent issue and the number of sub-tasks of the parent issue.
linenumberstrue
This is the issue summary: "%{issue.summary}" and that of the parent "%{parent.summary}". Issue %{parent.key} has %{count(subtasks(%{parent.key}))} sub-tasks.



Code Block
languagebash
titleAn alternative expression, where the entire expression is written as one function, would be
linenumberstrue
%{"This is the issue summary: \"" + %{issue.summary} + "\" and that of the parent \"" + %{parent.summary} +"\". Issue " + %{parent.key} + " has "+count(subtasks(%{parent.key})) +" sub-tasks."}
UI Text Box
typetip

The following combination  of characters has to be escaped by "\" when not being used as a field code or function delimiter:   %{  →  \%\{