We are using ScriptRunner to populate a scripted custom field called 'Most Recent Comment'. The simple script (below) updates the field with the latest comment. However, when a user is mentioned in a comment, it pulls in the user's Account ID rather than their Name/Email. Does anybody have any alternatives or solutions for this issue?
This worked seamlessly in Datacenter, but due to Atlassian's attempt to replace us all with Account IDs in Cloud it's causing serious issues for our users.
def comments = issue.fields.comment
// Get the last comment
def lastComment = comments.comments ? comments.comments[-1] : null
// Return the comment body if it exists
if (lastComment) {
return lastComment.body
}
return null