Reputation: 531
we have been using "Script Runner" plug-in to send custom emails. The below code works fine transition post function.
<% if (lastComment)
out << lastComment
%>
Whereas, the custom email in script listeners below line instead of the actual last comment
com.atlassian.jira.issue.comments.CommentImpl@4fexxxxx
Can you suggest a solution for this please.
Upvotes: 0
Views: 1897
Reputation: 1
import com.atlassian.jira.component.ComponentAccessor
def lastcomment = ComponentAccessor.getCommentManager().getLastComment(issue)
if (lastcomment != null) {
return lastcomment.body
}
return null
Upvotes: 0
Reputation: 171194
If you look at the documentation for that class, you probably want to get the lastComment.body
Upvotes: 0