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??
I think this will help you:
import com.atlassian.jira.component.ComponentAccessordef commentMgr = ComponentAccessor.getCommentManager()def commentsUpdated = (commentMgr.getComments(issue).findAll {it.updated > it.created})def lastCommentUpdated = commentsUpdated.sort{it.updated}.last()
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
It looks like you're new here. Sign in or register to get started.