...
...
...
...
...
The 'Update any Issue Field' post-
Panel | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
This is the documentation for JSU for Jira Server/Data Center. If you are using JSU on Jira Cloud, see our JSU Cloud documentation. |
Description
The Update Any Issue Field post function updates any field to a specified value , after a transition has been completed. This can be a system- or a custom field. The field can be on the issue in transition(within the same issue) or on a related issue, like a sub-tasksubtask, a linked issue, or an issue within an Epic (during the transition on the Epic). In addition to setting values to fields, the Update any Issue Field post function can also add comments.
Configuration
You must specify the field to update and the desired corresponding value. For example:
...
Precondition
Include Page | ||||
---|---|---|---|---|
|
We use the Update any Issue Field post function like this in the 'Start Progress' transition of our Story issue types. If the Story is part of an Epic, the Epic Status status will be set to '
Status | ||||
---|---|---|---|---|
|
In the past, users forgot to change the Epic Status status in time and it was left behind as '
Status | ||
---|---|---|
|
Update field on all issues related as
The field can be on the issue in transition(within the same issue) or on a related issue, like a sub-tasksubtask, a linked issue, or an issue within an Epic (during the transition on the Epic).
See Related Issues for more explanation on this topic.
Field Value
Please make sure
Perform As User
Include Page | ||||
---|---|---|---|---|
|
Issue field values
Note |
---|
When defining field values, ensure that the value you enter is valid for |
...
the datatype of the |
...
selected field. Also verify |
...
that |
...
the context configuration for the project |
...
that uses the workflow will allow |
...
the modifying of the selected field. |
...
If not, the transition may fail at execution time. |
Typically you will use text or numbers as values.
See: Post Function Concatenation Operations
Info |
---|
|
Cascading Select fields
For Cascading Select fields, you may can either use the value of the option you would like to set, or it's idits ID. In either case, 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 would set the field content to that very option. Same ; similarly, if you would choose Train. Or, assuming 10701 is the ID of House, then the option House will be set.
Special macros
If you use
%%CURRENT_USER%%
as the field value (exactly this, nothing more), the use Train
.
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%%
...
:
The user who triggered the post function will be appended to the existing field content.Status colour Yellow title OBSOLETE
Info |
---|
Obsolete since JSU version 1.4.10: Please use Use the option 'Append value' combined with the macro ' %%CURRENT_USER%% ' instead. |
...
instead. |
Extended system and custom issue field references
Status | ||||
---|---|---|---|---|
|
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%%
.
Tip |
---|
If you need a list of Jira system fields for Jira Server/Data Center, see Atlassian’s Issue Fields and Status. |
Position of the post function
It is important to place the post function in the correct order of other post functions.
Create Transition
The 'The Create' transition is the very first transition, which does not yet has have a source status (only destination status - usually Open, but could also be another). Instead of using the "Update the Update any Issue Field " post function in the Create transition, you might consider to just configure configuring a default value for that field.
If you are using the " Update any Issue Field " post function in the Create transition, you must put it after the "Creates the issue originally." but before the "Re-index an issue to keep indexes in sync with the database." post function. Depending on the field type, you also need to add must add the Store Issue post function after the Update Any Issue Field.
Expand | ||
---|---|---|
| ||
In step 4 the "Store Issue" post function |
...
is needed, which you must add manually in the workflow configuration. In our example, we use a Workflow Precondition before the Update any Issue Field post function. |
Any other Transition (not Create)
Put Use the " Update any Issue Field " post function anywhere before the " Update change history for an issue and store the issue in the database ." post function
...
Examples
See the above example of a Story changing the Epic Status of its Epic.
...
Or, whenever a parent issue is set to
...
Status colour Blue title In Progress
...
, the assignee of all its
...
subtasks could be set to the current user (the one changing the status on the parent).
...
A developer
...
fixes a bug and proceeds in the Jira workflow to the
...
status (this might be triggered from his code pushed to Bitbucket). The 'Update any Issue Field' now addsStatus colour Green title Resolved
...
the label 'testing-required'.
...
There are also cases when you need a more complex solution. Have a look at Testing and Fixing Bugs.
For more information on how to configure a post - function in JIRAJira, see the JIRA Jira documentation.
Supported Field Types
Include Page