Hi
I need to collect all comment's on the Issue since a date(for example, a week ago) on the script field thanks to Adaptivist Script Runner. I find this method(getCommentsForUserSince) on CommentManager Interface, but I can't find any tutorial on how to use it, and I don't know is it suitable for this case or not. Could you help me by editing my code to find the solution?
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.ComponentAccessordef commentManager = ComponentAccessor.getCommentManager()
def comment = commentManager.getComments(issue)
def results = "</br>"
if(comment != null){
for (item in comment) {
results = results + "</br>" + item.authorFullName + "</br>" + item.body + "</br>"
}
}
return results