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
separator|
Section
Column

Description

Substitution variables provide powerful capabilities to customize. Variables provide text string representations of fields useful for inclusion in other fields.

  1. Setting field values from other fields and custom field values.
  2. Constructing conditioning values.
  3. For constructing a list of issues to be updated.

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

Example: %parent_summary%

Column

Include Page
Terminology
Terminology

Section
Column

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 of the add-on. Create an issue if you need access to additional fields.

Note the terminology for the meaning of parent and original.

Tip
titleVariables used by post functions versus validators
  • Post functions are more likely to use field variables either from the original issue or parent issue as they represent the already changed values (post transition)
  • Validators are more likely to use the transition variables to access the screen values since the issue field values still represent the former values


Table plus


VariableDescriptionNotes
user_idUser ID of the user that did the transition
user_nameDisplay name of the user that did the transition
entryIssue key for current entry being processed
nowCurrent date/time in Jira complete date/time format or a specific format Since 1.3.
project, parent_project, original_project, entry_projectProject key of the issueQualified entries since 1.2.
project_id, parent_project_id, original_project_id, entry_project_idProject ID (numeric) of the issueSince 1.4.
project_name, parent_project_name, original_project_name, entry_project_nameProject name for the issueSince 2.3.
project_category, parent_project_category, original_project_category, entry_project_categoryProject category name for the project of the issueQualified entries since 1.2.
project_lead, parent_project_lead, original_project_lead, entry_project_leadUser ID of the project lead.Since 1.2.

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, entry_key

Issue key

parent_id, original_id, entry_id

Issue numeric IDSince 1.3.
parent_summary, original_summary, entry_summarySummary
parent_description, original_description, entry_descriptionDescription
parent_environment, original_environment, entry_environmentEnvironmentSince 1.1.
parent_issuetype, original_issuetype, entry_issuetypeIssue type
parent_status, original_status, entry_statusIssue statusSince 1.1.
parent_priority, original_priority, entry_priorityPriority
parent_reporter, original_reporter, entry_reporterReporter user ID
parent_assignee, original_assignee, entry_assigneeAssignee user ID
parent_components, original_components, entry_componentsComma separated list of componentsSince 1.1.
parent_component_descriptions, original_component_descriptions, entry_component_descriptionsComma-separated list of component descriptions. Some may be blank.Since 2.2

parent_affected_versions, original_affected_versions, entry_affected_versions

Comma-separated list of affected version names
parent_fixed_versions, original_fixed_versions, entry_fixed_versionsComma-separated list of fixed version names
parent_subtasks, original_subtasks, entry_subtasksComma-separated list of subtask issue keysSince 1.1.
parent_duedate, original_duedate, entry_duedateDue date in Jira DMY date format or a specific formatSpecific format.
parent_created, original_created, entry_createdCreated date in Jira complete date/time format or a specific format Specific format.
parent_updated, original_updated, entry_updatedUpdate date in Jira complete date/time format or a specific format Specific format.
parent_resolution_date, original_resolution_date, entry_resolution_dateResolution date in Jira complete date/time format or a specific format Specific format.
parent_resolution, original_resolution, entry_resolutionResolutionSince 1.1
parent_labels, original_labels, entry_labelsBlank separated list of labels

parent_labels_comma_separated, original_labels_comma_separated, entry_labels_comma_separated

Comma-separated list of labels
parent_watchers, original_watchers, entry_watchersComma-separated list of watcher user ids
parent_watches, original_watches, entry_watchesNumber of watchers of the issueSince 1.1.
parent_votes, original_votes, entry_votesNumber of votes for the issueSince 1.1.
parent_time_spent, original_time_spent, entry_time_spentTime spent on the issue in minutesSince 1.1. Note the JIRA timeSpent field returns seconds.
parent_estimate, original_estimate, entry_estimateCurrent estimate for the issue in minutesSince 1.1.
parent_original_estimate, original_original_estimate, entry_original_estimateTime spent on the issue in minutesSince 1.1. Note the 2 different meanings of the original word here (smile).
parent_security_level, original_security_level, entry_security_levelSecurity level name
<field name>

Parent issue's Jira issue field value

Deprecated but still active, recommend using specific replacements variables for clarity

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

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

Example: customfield_10010.

JIRA defines what information is returned by these fields.

original_<customfield name>

Original issue's custom field value

Similar to above.

Useful for sibling create scenarios.

original_<customfield id>

Original issue's custom field value

Similar to above.

Example: original_customfield_10010.

entry_<customfield name>

Entry issue's custom field value

Similar to above.

entry_<customfield id>

Entry issue's custom field value

Similar to above.

Example: original_customfield_10010.

transition_commentComment entered on the transition screen
transition_user_idActual transition user ID even if using acting supportSince 1.2.
transition_user_nameActual transition user name even if using acting supportSince 1.2.
transition_<system field name>Value entered on transition screen for system fieldsUsed for validators to get access to fields. Blank if not on transition screen. See Jira issue field constants.

transition_<customfield name>

transition_<customfield id>

Value entered on transition screen for custom fieldsUsed for validators to get access to fields. Blank if not on transition screen.
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 numberBlank if n is not in range for the issue list.
pattern1_nnth capture group from condition pattern 1Blank if n is not in the range of valid capture groups.
pattern2_nnth capture group from condition pattern 2Blank if n is not in the range of valid capture groups.
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 1.3.

Examples:

  • org.swift.jira.cot.last_created_key
  • org.swift.jira.cot.last_created_non_subtask_key (2.0)
  • 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 groupExample: group_jira-users.
role_<role name>Comma-separated list of user ids for users that are role actors for the project of the original issueExample: role_developers.

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


The 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>)

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


Examples: values_custom-cascade-select(entry), values_custom-cascade-select(1)

See How to use a cascade select configuration to provide a value map.

function_<function name>(<parameter>)

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%)%



Since 1.1. Open an improvement request if you have similar needs.

  • Version id is since 1.4
  • Field value is since 1.6
  • List since 1.7
  • FindReplace since 2.0
  • UserName since 2.1
  • VersionInfo since 2.1
  • GroupMemberList since 2.1
  • ComponentLead since 2.2
  • LinkedIssues since 2.7

Example: 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 action. 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.

Since 1.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.


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.