I need the comment to be specific but i have no idea what the condition is meant to be? Can anyone help please as i am a beginner.
Hi Robert,
In my fast-track transition listener, I set it up to fire on "Issue Commented" events.
For my condition, I wrote a script that gets the last comment on the issue and searches the comment for a specific email address. If the comment contains that email address, the condition will return true and the fast-track will execute the transition.
import com.atlassian.jira.issue.Issueimport com.atlassian.jira.component.ComponentAccessordef issue = event.issue as Issuedef commentManager = ComponentAccessor.getCommentManager()def commentBody = commentManager.getLastComment(issue).getBody()if (commentBody.contains("email@address.com")) {true}
Simply change text in the quotes to match what you want to look for.
Hi Joshua, thanks so much for your quick reply. I have set this up and it works perfectly! Thanks so much for your help
Glad to hear, Robert! Thanks for using ScriptRunner.
Josh
It looks like you're new here. Sign in or register to get started.