Page History
Excerpt | |||||
---|---|---|---|---|---|
Page properties | |||||
| |||||
Tech review |
| ||||
Style guide |
|
Status | ||
---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
UI Text Box | ||||
---|---|---|---|---|
| ||||
A 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 |
type | info |
---|
There are two parsing modes available in the expression parser:
General: you can write freetext and insert field codes anywhere in your text. These field codes will be replaced at runtime with the corresponding field values of the issue currently being processed. Thanks to the usage of 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 expressions as a parsing mode in every context.
|
Available parsing modes
Page properties report | ||||||
---|---|---|---|---|---|---|
|
Comments
UI Text Box | ||||||
---|---|---|---|---|---|---|
| ||||||
Most functions will accept text values so casting values to text is a very powerful function. Additionally, you can directly transform a field value to text using the following syntax: %{...somefield} | ||||||
UI Expand | ||||||
| ||||||
Mode | Supported features | Return type | Example | General | Field codes Parser Functions |
|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
This is the issue summary: %{issue.summary} |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
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) fild or as an issue list, JWT for Jira Cloud cares internally for a correct conversion.
Use mathematical operations:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
%{{trigger.issue.resolutionDate} - {trigger.issue.createdDate}} |
Working with issue lists
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
%{subtasks()} |
Nested functions
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
%{count(subtasks())} |
More 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.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
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 | ||||||
---|---|---|---|---|---|---|
| ||||||
%{"This is the issue summary: \"" + %{issue.summary} + "\" and that of the parent \"" + %{parent.summary} +"\". Issue " + %{parent.key} + " has "+count(subtasks(%{parent.key})) +" sub-tasks."} |
Field codes
Parser Functions
Status | ||||
---|---|---|---|---|
|
The logical parsing mode shall return true or false. Field codes, functions and quoted texts are supported as well as comparison operators and logical connection. For details, please have a look at Logical expressions
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
%{issue.assignee} = %{issue.reporter} |
An example which uses functions and logical connectors
language | bash |
---|---|
title | Check if the assignee is equals the reporter |
linenumbers | true |
info |
Comments can be added to all parsing modes. They serve as internal documentation for the expression and are ignored when evaluating the expression.
Parsing mode | Syntax | Examples | ||||
---|---|---|---|---|---|---|
General | Only available when using expressions enclosed by %{}. Starts with # and ends either at the end of the line or if the expression is closed by } |
| ||||
Logical | It starts with # and ends at the end of the line |
| ||||
Jira expression | It starts with // and ends with the end of the line |
|
Excerpt Include | ||||||
---|---|---|---|---|---|---|
|