Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Excerpt | ||
---|---|---|
| ||
A workflow post-function that sets the value of a selected field of the current issue or issues related to the current issue. |
This post-function can set multiple values for selected fields of an issue. The value can be provided either as text (with optional Nunjucks annotations) or as a JSON value.
Include Page | ||||
---|---|---|---|---|
|
Configure the post-function
Follow the steps above to add a post-function to a Transition.
From the list of post-functions, select Set issue fields.
Click Add.
The Set Issue Fields page will open (Figure 1, right). Configure the post-function as needed, setting the options for user to assign, the assignment behavior, and additional options as necessary. See below for details on each of the configurations.
Click Add.
Note |
---|
Note that you need to publish the workflow for the new post-function to take effect. |
Target Issue(s)
Include Page | ||||
---|---|---|---|---|
|
Info |
---|
You are viewing the documentation for Jira Server / Data Center. |
On This Page
Table of Contents | ||||
---|---|---|---|---|
|
Set fields
The Set fields section determines which fields will have their values set, and the values to use. The section includes two parts - the Add field menu where you select issue fields, and the list of fields that have been configured for your post-function.
Add field - Select a field from the pulldown menu to open a configuration panel (Figure 2, right).
The Add field configuration panel (Figure 2, right) enables configuration of the field value.
Field - The field being configured.
Options - Select additional options for the field:
Set only if field is empty - Set the field value only if the field is currently empty.
Create missing values - Create missing Components, Versions, or Options in the destination project. Only applies to compatible fields.
Ignore empty values - Don’t clear the field if the value is empty or null.
Add source value(s) to destination field - Add values from the source field to the destination field. Applies only to multi-valued fields.
Remove source value(s) to destination field - Remove values in the source field from the destination field. Applies only to multi-valued fields.
Field value - Configure the value for the field when it is set by the post-function. The value can be any value returned by either a Groovy Script or a Groovy Template.
The table of fields includes a few columns:
Field name - The name of the configured field.
Options - A list of any options selected during configuration.
Value - The Groovy script or template that returns the field’s value.
Actions
Edit () - Use the Edit button to open the Edit field configuration panel where an existing field configuration can be modified. Click Update to save the new configuration
Delete () - Remove the field from the post-function.
Global options
Set the behavior of the post-function.
Send notifications - Enable Jira to send notifications when it executes.
Conditional Execution
In addition to the Assignment behavior settings, it is possible to configure the post-function to execute (or not execute) only in specific circumstances. The Condition execution options set these behaviors.
The options are:
Only if condition is true - Check this option to execute the post-function based on the result of a groovy expression. See Conditional execution/validation using a Groovy expression for more information.
Condition - Enter a Groovy expression that evaluates to
true
orfalse
(or truthiness/falseness).
Run as
Include Page | ||||
---|---|---|---|---|
|
Error Handling
Include Page | ||||
---|---|---|---|---|
|