Daejwitt
Daejwitt

Reputation: 83

Jira Comment export html

I have a problem with the comment Export... I used this to put the comments into a Hashmap and put them into my vm which schould render them on html

issueParams.put("comments", ComponentAccessor.getCommentManager().getComments(issue));

the problem now is that there is the variable $comments and there are my comments but I can't get their content. It shows me in my foreach that there are two comments in my variable but i can't get for example the body ore the author with $comment.getBody...

Please Help

Upvotes: 1

Views: 146

Answers (1)

yelliver
yelliver

Reputation: 5926

The getComments() method returns a list of Comment object. You need to call getBody()

#foreach ($comment in $comments)
    $comment.body <br>
#end

Upvotes: 1

Related Questions