...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
Description
Substitution variables provide powerful capabilities to customize creating and updating issues. These variables provide text string representations of fields useful for inclusion in other fields.
Setting field values from other fields and custom field values
Constructing conditioning values
Facilitating /wiki/spaces/CSOT/pages/68748284 scenarios
The syntax for referencing substitution variables is: %<variable name>%. All text entry fields support replacement.
Example: %parent_summary%
Note |
---|
Note that for an entry substitution variable the syntax is @entry@. |
Substitution variables
Several example substitution variables are listed on the post function screen as an aid when creating definitions. However, the table below contains a more complete and detailed list of substitution variables available as you work with the Create Issue, Update Issues, or Create Subtask post functions.
Table plus |
---|
|
Substitution variable | Description |
---|
<customfield_name> parent_<customfield_name> | Parent issue's custom field value Recommend using prefix qualified name for clarity | <customfield_id> parent_<customfield_id> | Parent issue's custom field value | 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. The parameter(s) may be a substitution variable. | group_<group name> | Comma-separated list of user ids for members in the group | jql_result_count | Number of issues returned by the query | jql_result_list | Comma-separated list of issue keys returned from the query | jql_result_n | The issue key for the nth issue returned from the query where n is a number | entry | Entry from multiple issues processing Note |
---|
Note that for an entry substitution variable the syntax is @entry@. |
| now | Current date/time in Jira complete date/time format or |
|
...
a specific format | original_<customfield_name> | Original issue's custom field value Note |
---|
You may encounter a condition failed error at times when you use custom fields in your conditions. In such an event, it is recommended to try one of the following workarounds: |
|
|
...
Note that when you use customfield_id, only the ID of value is processed. |
| original_<customfield_id> | Original issue's custom field value Note |
---|
You may encounter a condition failed error at times when you use custom fields in your conditions. In such an event, it is recommended to try one of the following workarounds: |
|
|
...
Note that when you use customfield_id, only the ID of value is processed. |
| parent_affected_versions, original_affected_versions | Comma-separated list of affected version names | parent_assignee, original_assignee | Assignee user id | parent_components, original_components | Comma-separated list of components | parent_component_descriptions, original_component_descriptions | Comma-separated list of component descriptions. Some may be blank. | parent_created, original_created | Created date in Jira complete date/time format or |
|
...
a specific format | parent_description, original_description | Description Note |
---|
If the parent or original description field contains any non-image embedded media files or attachments such as GIF etc., you see a broken image in the Description section of the issue being created or updated. |
| parent_duedate, original_duedate | Due date in Jira DMY date format or |
|
...
a specific format | parent_environment, original_environment | Environment Note |
---|
If the parent or original environment field contains any non-image embedded media files or attachments such as GIF etc., you see a broken image in the Environment section of the issue being created or updated. |
| parent_fixed_versions, original_fixed_versions | Comma-separated list of fixed version names | parent_id, original_id | Issue numeric id | parent_issuetype, original_issuetype | Issue type | parent_key, original_key | Issue key | parent_labels, original_labels | Blank separated list of labels | parent_labels_comma_separated, original_labels_comma_separated | Comma-separated list of labels | parent_original_estimate_set, original_original_estimate_set | Original estimate | parent_remaining_estimate, |
|
...
original_remaining_estimate | Remaining estimate/ time remaining for the issue (not in minutes) | parent_original_estimate, original_original_estimate
| Original estimate in minutes | parent_estimate, |
|
...
original_estimate | Remaining estimate/ time remaining for the issue in minutes | parent_time_spent, |
|
...
original_time_spent | Time spent on the issue |
|
...
in minutes | parent_priority, original_priority | Priority | parent_project, original_project | Project key of the issue | parent_project_category, original_project_category | Project category name for the project of the issue | parent_project_id, original_project_id | Project id (numeric) of the issue | parent_project_lead, original_project_lead | User id of the project lead | parent_project_name, original_project_name | Project name for the issue | parent_reporter, original_reporter | Reporter user id | parent_resolution, original_resolution | Resolution | parent_resolution_date, original_resolution_date | Resolution date in Jira complete date/time format or |
|
...
a specific format | parent_security_level, original_security_level | Security level name | parent_sprint, original_sprint | For a Sprint custom field, set the sprint value using the specified substitution variables when the parent/original issues have one or more sprints assigned | parent_status, original_status | Issue status | parent_subtasks, original_subtasks | Comma-separated list of subtask issue keys | parent_summary, original_summary | Summary | parent_updated, original_updated | Update date in Jira complete date/time format or |
|
...
a specific format | parent_votes, original_votes | Number of votes for the issue | parent_watchers, original_watchers | Comma-separated list of watcher user ids | parent_watches, original_watches | Number of watchers of the issue | role_<role name> | Comma-separated list of user ids for users that are role actors for the project of the original issue | user_id | User id of user that is considered to be doing the transition | user_name | Display name of user that is considered to be doing the transition |
|
Note |
---|
When you use substitution variables with functions, (function_<function name>(<parameters>)), you might not always see the expected results |
...
Jira Legacy |
---|
server | System JIRA |
---|
serverId | 729d679a-302c-339f-958b-015e107badcd |
---|
key | CSOT-1280 |
---|
|
Working with custom fields
Custom fields are identified by either name or id (e.g., customfield_12345). Referencing a custom field by its name is often easier to know what the value is referring to. But referencing custom fields by their id will allow the configuration to survive the renaming of a custom field.
Info |
---|
Leave the Value field empty while defining the custom field(s) in your post function to set the respective custom field value to blank in the issue being created or updated. In the issue being created or updated:
|
Anchor |
---|
| configured-date-format |
---|
| configured-date-format |
---|
|
Configured date formatFor 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 parentheses following the substitution variable name. For example: %created(yyyy-MM-dd)% will result in replacement like 2013-05-28.
Insert excerpt |
---|
| Tips - Cloud |
---|
| Tips - Cloud |
---|
nopanel | true |
---|
|