I am using below script in the email template to get last comment.
Last Comment: <% (transientVars?.comment)
out << transientVars.comment
But how can include all comments in the custom email with comment created date and time?
How can i add last attachment in the email?
Thanks in advance,
I think you can get collection with attachments from com.atlassian.jira.issue.Issue interface, there is a method
Considering comments, have you tried com.atlassian.jira.issue.comments.CommentManager and com.atlassian.jira.issue.comments.Comment interfaces?
There are methods:
List<Comment> getComments(Issue issue)
This will return all comments for a given issue.
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events