Change the Value of a Custom field in a Post Function
Overview
This script sets the value of issue fields during a post function, in a workflow transition.
The syntax for updating/setting fields is exactly the same as used when creating, updating or transitioning an issue - see this example, except that you use issue.set { ... }
rather than issue.update { ... }
.
.set
, which is available on
com.atlassian.jira.issue.MutableIssue,
updates the issue fields in memory only, and does not persist them to the database. This works in a script post-function providing
it is ordered before the system post-functions for storing and reindexing an issue.
Example
Automatically set fields on issue ...