I have a Custom Listener from ScriptRunner for the "Work Started on Issue" event implemented like this:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.MutableIssue
import com.atlassian.jira.event.type.EventDispatchOption
def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
def im = ComponentAccessor.getIssueManager();
def i = event.issue
def userManager = ComponentAccessor.getUserManager();
def issueToChange = im.getIssueObject(i.id)
def user = userManager.getUserByName(currentUser.name)
def iType = i.issueType.name
if(iType == "Imputation"){
issueToChange.setDescription("hmm")
im.updateIssue(user, issueToChange, EventDispatchOption.DO_NOT_DISPATCH, false)
}
The script runs without an error when issue is set to the "in Progress" state.
In the History tab for the issue there is a record of the change made on the Description field:

But the Description field it self is empty!
Any ideas?
(It is on a local JIRA server installation version 7.8.0)
Thanks,
Birgir