Skip to main content
Example scripts
arrow icon
To homepage
Jira
Cloud icon
Cloud

Show Last Comment for an Issue in Jira Cloud

Features
Listeners
Created 1 year ago, Updated 17 day(s) ago
App in script
ScriptRunner For Jira
ScriptRunner For Jira
by Adaptavist
Compatibility
compatibility bullet
Jira
Language |
groovy
final lastCommentFieldName = 'Last Comment'
def myIssue = Issues.getByKey(issue.key)

myIssue.update {
    setCustomFieldValue(lastCommentFieldName, myIssue.getComments().last().body)
}
Having an issue with this script?
Report it here