This post function lets you copy an excerpt of a specific field.
Configuration
Select the field the value will be copied or extracted from.
Select the field the value will be copied to.
Leading delimiter
The value that will be extracted is enclosed by a leading and a trailing delimiter. You first have to define the type of the leading delimiter:
Option | Description |
---|---|
Text (case sensitive) | Specify the text that will serve as the leading delimiter. The text found by JWT must exactly match the delimiter (case sensitive). |
Text (ignoring case) | Choose this option if JWT should ignore the case. |
Regular expression (case sensitive) | Define a regular expression as the leading delimiter, respecting the case. |
Regular expression (case sensitive) | Choose this option if JWT should ignore the case. |
Expression
Once you have specified how JWT should identify the delimiter, you now have to specify the exact value. Dynamic patterns can be created through insertion of field codes that will be replaced with the corresponding field values.
Trailing delimiter
The options and the handling are identical to the leading delimiter configuration.
Delimiters specify the boundaries in which JWT extracts a value matching the given pattern. The pattern must follow directly after the leading delimiter.
Specifying delimiters is optional. If you want to search for a pattern in the entire field value leave the delimiters empty.
Delimiter examples
Text | Option | Leading delimiter | Trailing delimiter | Output |
---|---|---|---|---|
Hey [~a.grant], could you please have a look on CRM-8? Thank you! Tom (E-mail: t.harris@company.com) | Text (case sensitive) | [~ | ] | a.grant |
Text (ignoring case) | e-mail: | ) | t.harris@company.com | |
Regular expression (case sensitive) | ([A-Z]{3}-) | \? | 8 | |
Regular expression (case insensitive) | ([a-z]{3}-) | \? | 8 |
Excerpt pattern
Select which pattern (e.g combination of numbers or text values) will be searched for between the delimiters. The following options are available:
Option | Description |
---|---|
None (copy whole text between the delimiters) | Select this option if you want to copy the entire text found between the delimiters. |
Number | When you select this option, a regular expression will be constructed for you in the background. This expression will match the vast majority of possible values, but there might be valid values that don't match these regular expressions If you want to be sure to definitely include all values, please select "None (copy whole text between the delimiters)" or specify your own regular expression by selection one of the regular expression options. |
URL | Same as above. |
Same as above. | |
Date and time | Specify a valid date-time pattern. Additional information about date-time patterns can be found here. |
Regular expression (case sensitive) | Specify the pattern to be copied by defining a regular expression respecting the case. |
Regular expression (ignoring case) | Specify the the pattern to be copied by defining a regular expression ignoring the case. |
When selecting one of the regular expression options, you will be able to enter a regular expression to further process the matched text.
Multiple pattern matches
Unless you choose to copy the entire text between the delimiters, you have to select which value should be processed in case of multiple occurrences of the specified pattern (e.g. multiple email addresses). The following options are available:
Option | Description |
---|---|
First | The first occurrence of the matched pattern in the source field will be copied. |
Last | The last occurrence of the matched pattern in the source field will be copied. |
All | All occurrences of the matched pattern in the source field will be copied. Values are returned as a comma separated list of values |
You have the following options:
Option | Description |
---|---|
Update issue immediately | Choose to update issues immediately if you want Jira to fire a separate "Issue updated" event for any field change. This will also result in a dedicated issue history entry. |
Write protection | Check the write protection option if you want to prevent a field to be updated, if it already has a value. If checked, only empty fields will be set. |
Include leading delimiter | If checked, the specified leading delimiter will be included in the output. |
Include trailing delimiter | If checked, the specified trailing delimiter will be included in the output. |
The result of the logical expression must return a boolean value of either:
true
→ the post function will be executedfalse
→ the post function will not be executed
Using the conditional operator, even complex or multi-layered conditions can be constructed.
Make sure to learn more about defining logical expressions and browse through the various examples here: Logical mode
Make sure that the user running the post function has all the relevant permissions to perform the actions defined in the configuration (e.g. "Update Issues")!
If you want to keep track the actions being performed automatically, we suggest to create a dedicated JWT account, granted all relevant permissions, and use it in the Run as parameter to identify which changes have been made with JWT.
Use cases and examples
Use case | JWT feature | Workflow function | Parser functions | Label |
---|---|---|---|---|
Extract an email address from the last comment | ||||
Extract the issue priority from the summary |
If you still have questions, feel free to refer to our support team.