Substitution variables
On this page
Description
Substitution variables provide powerful capabilities to customize.
The syntax for referencing substitution variables is:Â %<variable name>%. All text entry fields support replacement.Â
Example: %parent_summary%
The functions use the following terminology. The terminology is also used in the substitution variables.
Term | Definition |
---|---|
original | The original issue that started the workflow transition. This could be an issue or subtask. |
parent | The parent issue of the original issue. If the original issue is not a subtask, then parent is the same as original |
Variables
Some variables are listed on the post function definition screen as an aid when creating definitions. This is a more complete and detailed list and represents the variables available with the most recent version (version 3.3) of the add-on. Create an issue if you need access to additional fields.
Note the terminology for the meaning of parent and original.
Starting with version 3.6.1, variables will be consistent with Create on Transition for Jira and Update on Transition for Jira. Variables with prefix issue will continue to be supported for compatibility, but the recommendation is to use the appropriate consistent prefix (original or parent) to avoid confusion.
Create issue transition
The Create issue transition is a unique transition. Some variables will not be available unless the post function is placed after the Creates the issue originally. post function. For example, original_key is not set.
Variable | Description | Notes | ||||||
---|---|---|---|---|---|---|---|---|
project | Project key of the issue being transitioned | |||||||
project_id | Project id (numeric) of the issue being transitioned | Since 3.9. | ||||||
project_name | Project name of the issue being transitioned | Since 4.3 | ||||||
project_category | Project category name for the project of the issue being transitioned | Since 3.6.1. Blank if the project does not have a category configured. | ||||||
project_default_security | Default issue security level name for the project | |||||||
project_default_security_id | Default issue security level id for the project | |||||||
now | Current date/time in JIRA complete date/time format or a specific format | Since 3.9. | ||||||
user_id | User id (also known as username) of user that did the transition | |||||||
user_key | User key of user that did the transition | Since 7.9 | ||||||
user_name | Display name of user that did the transition | |||||||
base_url | URL of this instance | Since 3.8 | ||||||
parent_key, original_key | Issue key | |||||||
parent_summary, original_summary | Summary | |||||||
parent_description, original_description | Description | |||||||
parent_environment, original_environment | Environment | Since 3.6.1 | ||||||
parent_issuetype, original_issuetype | Issue type | Since 3.6.1 | ||||||
parent_status, original_status | Issue status | Since 3.6.1 | ||||||
parent_priority, original_priority | Priority | Since 3.6.1 | ||||||
parent_reporter, original_reporter | Reporter user id (also known as username) | |||||||
parent_reporter_key, original_reporter_key | Report user key | |||||||
parent_assignee, original_assignee | Assignee user id (also known as username) | |||||||
parent_assignee_key, original_assignee_key | Assignee user key | Since 7.9 | ||||||
parent_components, original_components | Comma separated list of components | Since 3.6.1 | ||||||
parent_component_descriptions, original_component_descriptions | Comma separated list of component descriptions. Some may be blank. | Since 4.2 | ||||||
parent_affected_versions, original_affected_versions | Comma separated list of affected version names | |||||||
parent_fixed_versions, original_fixed_versions | Comma separated list of fixed version names | |||||||
parent_subtasks, original_subtasks | Comma separated list of subtask issue keys | Since 3.6.1. | ||||||
parent_duedate, original_duedate | Due date in JIRA DMY date format or a specific format | Specific format is available since 3.6.1. | ||||||
parent_created, original_created | Created date in JIRA complete date/time format or a specific format | Specific format is available since 3.6.1. | ||||||
parent_updated, original_updated | Update date in JIRA complete date/time format or a specific format | Specific format is available since 3.6.1. | ||||||
parent_resolution, original_resolution | Resolution | Since 3.6.1. | ||||||
parent_resolution_date, original_resolution_date | Resolution date in JIRA complete date/time format or a specific format | Specific format is available since 3.6.1. | ||||||
parent_labels, original_labels | Blank separated list of labels | Since 3.6.1 | ||||||
parent_labels_comma_separated, original_labels_comma_separated | Comma separated list of labels | Since 3.6.1. | ||||||
parent_watchers, original_watchers | Comma separated list of watcher user ids | Since 3.6.1. | ||||||
parent_watches, original_watches | Number of watchers of the issue | Since 3.6.1. | ||||||
parent_votes, original_votes | Number of votes for the issue | Since 3.6.1. | ||||||
parent_time_spent, original_time_spent | Time spent on the issue in minutes | Since 3.6.1. Note the JIRA timeSpent field returns seconds. | ||||||
parent_estimate, original_estimate | Current estimate for the issue in minutes | Since 3.6.1. | ||||||
parent_original_estimate, original_original_estimate | Time spent on the issue in minutes | Since 3.6.1. Note the 2 different meanings of the original word here . | ||||||
parent_security_level, original_security_level | Security level name | |||||||
<field name> | Parent issue's JIRA issue field name Deprecated but still active, recommend using specific replacements variables instead | Examples: components, resolution. See Jira issue field constants. JIRA defines what information is returned by these fields. | ||||||
<customfield name> parent_<customfield name> | Parent issue's custom field value Recommend using prefix qualified name for clarity. Unqualified name use is deprecated. | Must be an exact match including case and blanks. JIRA defines what information is returned by these fields. | ||||||
<customfield id> parent_<customfield id> | Parent issue's custom field value Recommend using prefix qualified name for clarity. Unqualified name use is deprecated. | Example: customfield_10010. JIRA defines what information is returned by these fields. | ||||||
original_<customfield name> | Original issue's custom field value | Since 3.6.1. Similar to above. | ||||||
original_<customfield id> | Original issue's custom field value | Since 3.4. Similar to above. Example: original_customfield_10010. | ||||||
parent_value_id_<customfield name> parent_value_id_<customfield id> | Parent issue's custom field value id (or key) for custom fields who's value is derived from an unique identifier like an option id or key | Since 7.9 | ||||||
original_value_id_<customfield id> original_value_id_<customfield name> | Original issue's custom field value id (or key) for custom fields who's value is derived from an unique identifier like an option id or key | Since 7.9 | ||||||
transition_comment | Comment entered on the transition screen | |||||||
jql_result_count | Number of issues returned by the query | Since 3.6.1. | ||||||
jql_result_list | Comma separated list of issue keys returned from the query | Since 3.6.1. | ||||||
jql_result_n | The issue key for the nth issue returned from the query where n is a number | Since 3.6.1. Blank if n is not in range for the issue list. | ||||||
pattern1_n | nth capture group from condition pattern 1 | Since 3.6.1. Blank if n is not in the range of valid capture groups. Example: pattern1_1. If you used this on releases previous to 3.6.1, update to use cli_pattern1_n instead. This incompatibility was introduced due to the introduction of the the conditioning patterns. | ||||||
pattern2_n | nth capture group from condition pattern 2 | Since 3.6.1. Blank if n is not in the range of valid capture groups. Example: pattern2_1. If you used this on releases previous to 3.6.1, update to use cli_pattern1_n instead. This incompatibility was introduced due to the introduction of the the conditioning patterns. | ||||||
cli_pattern1_n | nth capture group from cli find pattern 1 | Since 3.6.1. | ||||||
cli_pattern2_n | nth capture group from cli find pattern 2 | Since 3.6.1. | ||||||
property_<property name> | Transition property. Other transition functions can add transition properties that can be referenced. This provides a way to access those transition properties. You must know the property name.
| Since 3.8.0. Examples:
| ||||||
group_<group name> | Comma separated list of user ids for members in the group | Since 3.6.1. Example: group_jira-users. | ||||||
role_<role name> | Comma separated list of user ids for users that are role actors for the project of the original issue | Since 3.6.1. Example: role_developers. | ||||||
values_<customfield name> values_<customfield id> | Comma separated list of custom field option values in the context of the original issue | Since 3.6.1. Custom field should be of a type that has option value like multi-select or cascade select. For cascade select fields, it is a list of parent option values. | ||||||
values_<customfield name>(<value or sub variable>) values_<customfield id>(<value or sub variable>) | Comma separated list of cascade select child option values for the specific parent value provided | Since 3.6.1. Primarily used for advanced scenarios for multi-issue creation scenarios using entry substitution variable. See CSOT-103. Examples: values_custom-cascade-select(entry), values_custom-cascade-select(1) | ||||||
function_<function name>(<parameters>)
| Functions that derive useful text values that can be used as substitution variables. Some are similar to their equivalent JQL function (follow link). The project key may be a substitution value. Make sure you use the correct syntax! Set custom field: field: My custom field, value: %function_earliestUnreleasedVersion(%project%)% | Since 3.6.1. Open an improvement request if you have similar needs.
Example: function_earliestUnreleasedVersion(%project%) | ||||||
function_message | Message created by the last cli post function. | This provides a way to communicate between cli workflow functions. | ||||||
validator_message | Message created by the last cli validator. | This provides a way to communicate between workflow functions. | ||||||
cli_replace_<name> | Many Atlassian CLI products support setting replacement variables during the running of actions in order to facilitate use in a subsequent actions. Run CLI Actions in Jira workflow functions will take these replacement variables from the running of a CLI action and populate the transition properties so they can be available in subsequent functions as substitution variables. Use the prefix and the replacement name from the lists shown on the replacement variables page after running a CLI action function that produces replacement variables. | Since 3.6.1. Example: cli_replace_issue will be replaced with the issue key of the last created issue after the createIssue action is run by a CLI action function. | ||||||
variable_<user defined variable name> | User defined variables can be configured on the Configuration screen. See User Defined Substitution Variables for more information. Example configuration:
| Since 4.2. Example usage: --action getServerInfo %variable_jira-local% |
Configured date format
For date substitution variables, the format of the replacement variable can be specified if the default format is not desirable. The format is specified by a Simple Date Format string enclosed in parenthesis following the substitution variable name. For example: %created(yyyy-MM-dd)% will result in replacement like 2013-05-28.
Log a request with our support team.
Confluence®, Jira®, Atlassian Bamboo®, Bitbucket®, Fisheye®, and Atlassian Crucible® are registered trademarks of Atlassian®
Copyright © 2005 - 2024 Appfire | All rights reserved. Appfire™, the 'Apps for makers™' slogan and Bob Swift Atlassian Apps™ are all trademarks of Appfire Technologies, LLC.