Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,362,003
Community Members
 
Community Events
168
Community Groups

Get Last Comments

Need the Last Comment, Script Runner Fields can help.

Create a custom script Script Runner Field and use this code

import com.atlassian.jira.component.ComponentAccessor

def commentManager = ComponentAccessor.getCommentManager()
def comment = commentManager.getLastComment(issue)

// check to see if comments exist - return comment body if so
if (comment != null) {
return comment.body
}

return null

It returns the last comment and can be used as a field in dashboards.

I found this in an older JIRA community post, but don't remember where exactly so I can't give proper credit -thank you for who ever created this.

0 comments

Comment

Log in or Sign up to comment
TAGS
Community showcase
Published in Jira Software

An update on Jira Software customer feedback – June 2022

Hello Atlassian Community! Feedback from customers like you has helped us shape and improve Jira Software. As Head of Product, Jira Software, I wanted to take this opportunity to share an update on...

5,093 views 18 32
Read article

Atlassian Community Events