I want to find last edited comment : Currently I am using {{issue.comment.last.body}} but it is giving me last created comment.
But I want to use last edited comment for my project.
Anyone knows how to find this??
Hi @Nishit Popat -- Welcome to the Atlassian Community!
As you have asked the question, I do not believe it is possible within an Automation for Jira rule.
The smart value of interest for your use case is {{issue.comments.updated}} and the comment you want is {{issue.comments.updated.max}} from the list.
I can think of a couple of limitations for the built-in features that prevent getting the associated comment:
A possible work-around would be to trigger on issue updated and to detect a comment edit with the changelog, then save that date/time and comment for later use in a custom field.
Kind regards,
Bill
I think this will help you:
import com.atlassian.jira.component.ComponentAccessor
def commentMgr = ComponentAccessor.getCommentManager()
def commentsUpdated = (commentMgr.getComments(issue).findAll {it.updated > it.created})
def lastCommentUpdated = commentsUpdated.sort{it.updated}.last()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you catch the news at Team ‘25? With Loom, Confluence, Atlassian Intelligence, & even Jira 👀, you won’t have to worry about taking meeting notes again… unless you want to. Join us to explore the beta & discover a new way to boost meeting productivity.
Register today!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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.