Dear all,
I'm trying to build in a postfunction a jmwe-scripted field to get all comments stored in an pretty view, so that it can be used at the end of a transition to be added to a mail.
I'm trying:
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.comments.Comment
import com.atlassian.jira.issue.comments.CommentManager
import com.atlassian.jira.component.ComponentAccessor
def commentManager = ComponentAccessor.getCommentManager()
def comment = issue.get("comment")
comment.body
However this only results into an array-list-ouput listing all comments in a line separated by comma. This is not really user-friendly.
I'm new to jira-groovy-stuff, so any help would be highly appreciated. Imho in my above expression there is "only" missing a loop to bring the arraylist in a nice string- or even better a html-format?!
Thank you in advance! ;-)
PS. we only have jmwe but no script runner.