Created
January 14, 2015 11:35
-
-
Save jechlin/0c5e59c44d57fb5a5abd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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