JIRA Scripting, Plugin and Report Development, ScriptRunner & Tempo tips
Updating a custom field with and without keeping history
Written on November 2, 2019
There are at least two ways how to update a custom field that I know of. Depending on your needs, choose whether you want to store a change record on issue history or not.
These instructions have been tested in JIRA 7.13.9.
Updating a custom field without keeping history
If you want to update custom field value but do not want the change to appear in issue history, use updateValue method on CustomField class.
Here’s an example:
Updating custom field and keeping history
For the change to appear in the issue history, use setCustomFieldValue on Issue class to set the value and then IssueManager’s method updateIssue to persist the change. Use the last parameter of the method to specify whether you want e-mail notifications to be sent or not.
Comments