Skip to end of banner
Go to start of banner

Set

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

Description

The ‘Set’ operation sets the value of a selected field on the new issue. You can add any number of Set configurations.

Configuration

Click Add Configuration to add more field settings to your configuration.

Field Value

With JSU, you can copy or set field values on issues created through a post function. Typically you will use text or numbers as values.

On this page:

When setting values to fields, it’s important to ensure the data you define is compatible with the field type. For example you cannot update a Number field with a text-value, "Hello world". Similarly, you cannot update a User Picker field with data that is not a valid user. You should also ensure that any fields you want to update are present on any screen/s related to the context or transition your rule executes from.

If any configuration is not valid, then JSU will be unable to update the desired issue/s as instructed.

Cascading select lists

For cascading select lists, you can either use the value (name or number) of the option you would like to set, or the option ID. When using the value, there is no need to specify the parent option. For example:

  • Vehicles

    • Car

    • Train

    • Bus

  • Buildings

    • House

    • Skyscraper

Using Vehicles as the parameter for Field Value sets the field content to that option; similarly, if you use Train

Using the option ID for cascading fields

If the set value you define occurs more than once in the cascading select list, use the option ID instead of a name. The option ID lets JSU determine the correct value to assign in the new issue.

Example:

A custom cascading select list called Onboarding Select contains: Marketing and Onboarding - Marketing.

Example cascading select list custom field as described on this page.

To use the parent option, Marketing, enter the option ID of the parent option. Here, the option ID for the parent option is 10200.

The option ID for the parent option highlighted in the URL as described on this page.

In the Set configuration field, enter 10200 then select Onboarding Select.

The Set field configured with the parent option ID.

The option ID is not the same as a custom field ID. The custom field ID in this example is the ID assigned to the Onboarding Select custom field. Each option configured for the Onboarding Select cascading field is assigned a unique ID. To find an option ID, see Atlassian’s How to find any custom ID to select your preferred method, and then locate the option ID instead of the custom field ID.

Field reference macros

JSU supports the use of macros to reference data or issue field values when configuring some post functions, for example, Update Any Issue Field, or in the Set and Copy operations for the Create a Linked Issue post function.

Legacy system field references

Support for referencing the Current User, Previous User, and Current Date and Time is provided by using the macro syntax below. You can use only one legacy macro at a time to set or update a field. Legacy macros cannot be combined with the

  • %%CURRENT_USER%%: The user who triggered the post function will be set as the value.

  • %%PREVIOUS_USER%%: The field is updated with the previous user assigned to the field. This is valid for single-user picker fields in the ‘Update Any Issue Field’ post function.

  •  %%CURRENT_DATETIME%%: The current date and time will be set as the value.

  •  %%ADD_CURRENT_USER%%: OBSOLETE The user who triggered the post function will be appended to the existing field content.

Obsolete since JSU version 1.4.10: %%ADD_CURRENT_USER%%

Use the option 'Append value' combined with the macro %%CURRENT_USER%% instead.

Extended system and custom issue field references NEW

From version 2.43.0, you can reference any issue field using the prefix issue followed by the field name, for example, %%issue.Assignee%% or %%issue.Labels%%. This syntax can be used in the Update Any Issue Field post function and with the Set and Copy operations for the Create a Linked Issue post function.

Multiple field references

You can provide multiple issue field references using macros, for example, you can update a Description field so that it references %%issue.Approver%% is %%issue.Reporter%% where approver is a custom field. Similarly, you can update a comment field with %%issue.Approver%% update %%issue.Creator%% on change to %%issue.Security Level%%.

If you need a list of Jira system fields for Jira Server/Data Center, see Atlassian’s Issue Fields and Status.

See also

Post Function Concatenation Operations

Issue Field

Select the field you want to update.

Overwrite / Append / Prepend

For text fields and some fields that can accept multiple values, for example, checkboxes, you can choose to overwrite, append or prepend the new value to any existing value. For a text field, you can also choose a separator that will be placed between the values.

Create version if necessary

If your origin issue has a version, it can be copied to the linked issue.

If the destination field is 'Fix Version/s', 'Affects Version/s' or a custom field of type 'Version Picker', you can choose to create a new version in the target project, if it does not yet exist. If you don't select this option and that version does not yet exist, an error message will be displayed to users and the transition won't complete.

The new version will be created even if the user does not have the Administer Projects permission. (Normally a user needs that permission to be able to create a new version.)

Special 'Sources'

  • *** default value ***The default value of the destination field will be set.

  • *** empty ***The destination field will be set with the empty string value. When overwriting a field value, the resulting destination value will be null. When appending/prepending a field value, the resulting destination value will be the concatenation of the existing field value (if any) and the separator. If the aim is to clear the destination field value, use JSU’s ‘Set Any Field Value’ or ‘Clear Field Value’ post function. (See: Post Function Concatenation Operations)

  • *** transition comment ***Use the comment that the user entered on the transition screen.

  • *** last comment ***Use the last (most recent) comment on the issue before the transition was started.

Special 'Destinations'

  • *** new comment ***Create a new comment with the value from the source field.

  • *** new internal note ***: Create a new internal note with the value from the source field (Jira Service Management only).

A new internal note is created only for Jira Service Management (JSM) project issues. For non-JSM projects, a regular comment is created with the value from the source field.

  • No labels