I am trying to change the status of an issue to closed based off a specific comment.
this is the what I am adding in the listener, but it is not updating the status of the issue when i add the comment.
Events: Issue Commented
Condition:
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.component.ComponentAccessor
def commentManager = ComponentAccessor.getCommentManager()
def comment ="internal production"
def comments = commentManager.getComments(issue)
log.warn(comments)
if (comments.contains(comment))
Action: Closed(51)
I think I need to iterate through the comment objects and try the matching text on each one, i just don't know how to write the code to do this, any help would be appreciated.