I have a scripted field to return the last comment from issue:
import com.atlassian.jira.component.ComponentAccessor
def commentManager = ComponentAccessor.getCommentManager()
def comments = commentManager.getComments(issue)
if (comments) {
comments.last().body
}
However, when I search for issues and make the Last Comment visible on the view, the value contains the wiki markup, not pure text (or html), e.g.
{color} +{color:#333333}*Recovery*+ * *Recovery Plan for TOP Markets
Also when I export the search results to CSV, it contains the markup.
How can I correct it?
Thank you, Miro