Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

change status to closed in jira issues using Fast-track transition an issue listener

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


import com.atlassian.jira.ComponentManager
import com.atlassian.jira.component.ComponentAccessor

def commentManager = ComponentAccessor.getCommentManager()

def comment ="internal production"
def comments = commentManager.getComments(issue)
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.

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Marketplace Apps & Integrations

How to create a Confluence page linked to a Jira cloud ticket

Have you been looking for a solution to easily create Confluence pages directly from a Jira Cloud issue? The no code solution is here with the brand new app Elements Publish to Confluence, which work...

58 views 0 2
Read article

Community Events

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

Events near you