Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Div
idProductTOC

On this page

Table of Contents
maxLevel1
excludeOn this page
typeflat
separatorpipe


Description

Substitution variables provide powerful capabilities to customize the creation of issues. 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.
  • For multi-issue creation scenarios.

The syntax for referencing substitution variables is: %<variable name>%. All text entry fields support replacement. 

Example: %parent_summary%

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 or Create Sub-task post function.

Table: containing valid substitution variables and their descriptions.

Table plus
sortColumn1


Substitution VariableDescription
user_idUser id of user that is considered to be doing the transition
user_nameDisplay name of user that is considered to be doing the transition
entryEntry from multiple issues processing
nowCurrent date/time in JIRA complete date/time format or a specific format 
project, parent_project, original_project, entry_projectProject key of the issue
project_id, parent_project_id, original_project_id, entry_project_idProject id (numeric) of the issue
project_name, parent_project_name, original_project_name, entry_project_nameProject name for the issue

project_category, parent_project_category, original_project_category, entry_project_category

Project category name for the project of the issue

project_lead, parent_project_lead, original_project_lead, entry_project_lead

User id of the project lead.

project_default_security, original_project_default_security, entry_project_default_security

Default issue security level name for the project

project_default_security_id, original_project_default_security_id, entry_project_default_security_id

Default issue security level id for the project

parent_key, original_key

Issue key
parent_id, original_id, entry_idIssue numeric id
parent_summary, original_summarySummary
parent_description, original_descriptionDescription
parent_environment, original_environmentEnvironment
parent_issuetype, original_issuetypeIssue type
parent_status, original_statusIssue status
parent_priority, original_priorityPriority
parent_reporter, original_reporterReporter user id
parent_assignee, original_assigneeAssignee user id
parent_components, original_componentsComma separated list of components
parent_component_descriptions, original_component_descriptionsComma separated list of component descriptions. Some may be blank.
parent_affected_versions, original_affected_versionsComma separated list of affected version names
parent_fixed_versions, original_fixed_versionsComma separated list of fixed version names
parent_subtasks, original_subtasksComma separated list of subtask issue keys
parent_duedate, original_duedateDue date in JIRA DMY date format or a specific format
parent_created, original_createdCreated date in JIRA complete date/time format or a specific format 
parent_updated, original_updatedUpdate date in JIRA complete date/time format or a specific format 
parent_resolution, original_resolutionResolution
parent_resolution_date, original_resolution_dateResolution date in JIRA complete date/time format or a specific format 
parent_labels, original_labelsBlank separated list of labels
parent_labels_comma_separated, original_labels_comma_separatedComma separated list of labels
parent_watchers, original_watchersComma separated list of watcher user ids
parent_watches, original_watchesNumber of watchers of the issue
parent_votes, original_votesNumber of votes for the issue
parent_time_spent, original_time_spentTime spent on the issue in minutes
parent_estimate, original_estimateCurrent estimate for the issue in minutes
parent_original_estimate, original_original_estimateTime spent on the issue in minutes
parent_security_level, original_security_levelSecurity level name
<field name>

Parent issue's JIRA issue field value

Deprecated but still active, recommend using specific replacements variables instead

<customfield name>

parent_<customfield name> (since 3.4)

Parent issue's custom field value

Recommend using prefix qualified name for clarity

<customfield id>

parent_<customfield id> (since 3.4)

Parent issue's custom field value

original_<customfield name>

Original issue's custom field value

original_<customfield id>

Original issue's custom field value
transition_commentComment entered on the transition screen
transition_user_idActual transition user id even if using acting support
transition_user_nameActual transition user name even if using acting support
jql_result_countNumber of issues returned by the query
jql_result_listComma separated list of issue keys returned from the query
jql_result_nThe issue key for the nth issue returned from the query where n is a number
pattern1_nnth capture group from condition pattern 1
pattern2_nnth capture group from condition pattern 2
property_<property name>

Transition property. Other transition functions can add transition properties that can referenced. This provides a way to access those transition properties. You must know the property name.

Examples:

  • org.swift.jira.cot.last_created_key
  • org.swift.jira.cot.last_created_non_subtask_key (4.6)
  • org.swift.jira.cot.created_key_list
  • org.swift.jira.acli.validator_message - result message from last CLI action validator
  • org.swift.jira.acli.function_message - result message from last CLI action post function
group_<group name>Comma separated list of user ids for members in the group
role_<role name>Comma separated list of user ids for users that are role actors for the project of the original issue

values_<customfield name>

values_<customfield id>

For special use cases only needing access to the field configuration.

Comma separated list of custom field option values in the context of the original issue

Tip

This is for accessing the configuration of the custom field and NOT the values of a custom field for an issue (see custom field value substitution variables mentioned above).


values_<customfield name>(<value or sub variable>)

values_<customfield id>(<value or sub variable>)

For special use cases only needing access to the field configuration.

Comma separated list of cascade select child option values for the specific parent value provided.

Tip

This is for accessing the configuration of the custom field and NOT the values of a custom field for an issue (see custom field value substitution variables mentioned above).


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 parameter(s) may be a substitution variable.

Tip
tilteMake sure you use the correct syntax!
titleMake sure you use the correct syntax!

Set custom field: field: My custom field, value: %function_earliestUnreleasedVersion(%project%)%


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. JCLIP 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.


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. Yet, by referencing custom fields by their id will allow the configuration to survive the renaming of a custom field.


Anchor
configured-date-format
configured-date-format

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.