I have a script to fetch "last updated by" but it doesn't work for comments. Can you help me with the piece of code needs to be added here.
//Code
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.user.ApplicationUser
def changeHistoryManager = ComponentAccessor.changeHistoryManager
def userManager = ComponentAccessor.userManager
def changes = changeHistoryManager.getAllChangeItems(issue)
def userKey = changes.sort(false).last().userKey
def user = userManager.getUserByKey(userKey)
def name = user.displayName
return user;
log.error(user.displayName.toString())
Regards,
Ankit Choudhary
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.