This page contains a comprehensive overview of all text related information.
Fixed values
- When used inside the function mode (
%{...}
), Texts need to be written in double quotes, e.g., "This is a string literal." - Operator + is used for concatenating texts. e.g.,
"This is" + " a text." = "This is a text."
. - The Escape character is "
\
" . This character can precede any of the following characters: ",
\, n, r, t, f and b in order to invoke an alternative interpretation. e.g. \n for a linefeed..
For example, if you want to introduce a double quote in a string literal you should precede it with escape character\
as in"The man said: \"Hello!\"."
, where we are using escape character\
to write stringHello!
in double quotes.
Variable values (field values)
Text field values can be inserted in expressions using field codes with format %{...somefield}, or %{...somefield.i} for referencing concrete levels in cascading select fields (i = 0 for base level).
Pro tip
%{...somefield} = null
or %{...somefield} != null
. For a concrete level in a Cascading Select or Multi-Cascading Select field, you should use
%{...somefield.i} = null
or %{...somefield.i} != null
.
Any field type has a text value, so you can also use %{...somefield} to insert text values of fields of type Number (which includes Date and Date-Time values).
Available functions
Function | Short description | Output |
---|---|---|
findPattern() | Returns all substrings matching a given regular expression. | TEXT LIST |
findPatternIgnoreCase() | Returns all substrings matching a given regular expression, ignoring the case. | TEXT LIST |
findReplaceAll() | Replaces all occurrences of a given text with the given replacement. | TEXT |
findReplaceAllIgnoreCase() | Replaces all occurrences of a given text with a given replacement, ignoring the case. | TEXT |
findReplaceFirst() | Replaces the first occurrence of a given text with the given replacement. | TEXT |
findReplaceFirstIgnoreCase() | Replaces the first occurrence of a given text with the given replacement, ignoring the case. | TEXT |
getFromJSON() | Returns the result of a given JMESPath which is applied to a JSON | TEXT |
issueType() | Returns the name of the issue type with a given ID. | TEXT |
jiraExpression() | Returns the result of a Jira expression. | TEXT |
length() | Returns the length any given text. | NUMBER |
matches() | Checks, if the given text matches the given regular expression. | BOOLEAN |
project() | Returns the key of the project with a given ID. | TEXT |
replaceAll() | Replaces all substrings matching a regular expression with a given replacement. | TEXT |
replaceFirst() | Replaces the first substring matching a given regular expression with a given replacement. | TEXT |
resolution() | Returns the name of the resolution with a given ID. | TEXT |
status() | Returns a status name. | TEXT |
substring() | Returns a specific part of a text. | TEXT |
toLowerCase() | Converts a given text with all its characters to lower case. | TEXT |
toUpperCase() | Converts a given text with all characters to upper case. | TEXT |
trim() | Removes leading and trailing blanks (white spaces and tabs) from a text. | TEXT |
Examples
Input | Output |
---|---|
%{"Hello" + " " + "world" + "."} | Hello world. |
%{trim(%{issue.summary})} | Summary of an issue without leading and trailing blanks |
%{issue.description} \nLAST USER: %{toUpperCase(%{system.currentUser})} | Description of an issue and a new line with string "LAST USER: " and the name of current user in upper case. |