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.Issue
import com.atlassian.jira.component.ComponentAccessor
def issue = event.issue as Issue
def 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 :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Glad to hear, Robert! Thanks for using ScriptRunner. :)
Josh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.