Skip to content

Instantly share code, notes, and snippets.

@jechlin
Created January 14, 2015 11:35
Show Gist options
  • Save jechlin/0c5e59c44d57fb5a5abd to your computer and use it in GitHub Desktop.
Save jechlin/0c5e59c44d57fb5a5abd to your computer and use it in GitHub Desktop.
package examples.answers
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.comments.Comment
def commentManager = ComponentAccessor.getCommentManager()
def thisComment = transientVars["comment"]
Issue issue = issue
if (thisComment) {
def comments = commentManager.getComments(issue)
def lastComment = comments.last() as Comment
// update the comment
commentManager.update(lastComment, false)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment