Hi all,
Our team utilizes Scriptrunner and JMWE plugins. I want to create a custom scripted field that stores the user/author that last changed the value of the Assignee field.
Referencing this community post from a couple years ago:https://community.atlassian.com/t5/Jira-questions/How-to-get-previous-changed-custom-field-data/qaq-p/829463
I figured this might be a step in the right direction:
import com.atlassian.jira.component.ComponentAccessor
def changeHistoryManager = com.atlassian.jira.component.ComponentAccessor.getChangeHistoryManager()
def old = changeHistoryManager.getChangeItemsForField(issue, 'Assignee')
return old.fromString
However, this doesn't seem to return anything. It only returns 'Anonymous' when tested on an issue in which a user (JohnD) manually changed the value of Assignee. I want this to be able to return the user who last changed the Assignee field.
Is this possible?