我们一直在使用“Script Runner”插件来发送自定义电子邮件。下面的代码可以很好地完成转换后功能。
<% if (lastComment)
out << lastComment
%>
然而,脚本侦听器中的自定义电子邮件位于行下方,而不是实际的最后一条评论
com.atlassian.jira.issue.comments.CommentImpl@4fexxxxx
您能为此建议一个解决方案吗?
如果您查看 该类的文档,您可能想要获得
lastComment.body
import com.atlassian.jira.component.ComponentAccessor
def lastcomment = ComponentAccessor.getCommentManager().getLastComment(issue)
if (lastcomment != null) {
return lastcomment.body
}
return null