Example scripts
To homepage
Jira

Show Last Comment for a Work Item in Jira Cloud
App in script

ScriptRunner For Jira
by Adaptavist
Compatibility

Jira
Language |
groovy
final lastCommentFieldName = 'Last Comment'
def myWorkItem = WorkItems.getByKey(issue.key)
myWorkItem.update {
setCustomFieldValue(lastCommentFieldName, myWorkItem.getComments().last().body)
}Having an issue with this script?
Report it here