I am not familiar with this scripting
Can someone help me with:
create a scriptrunner listener for an "issue created" event,
and in the listener
check if there is an "Epic-Story Link" type link, if yes
get the Epic linked to the issue
get the watchers of the Epic
send a mail to these watchers
Hello Matthew,
I hope you are having a nice day.
I'm not sure on how you can perform such automation with Scriptrunner plugin, however, I'm aware of some solutions which do not require any codes.
I understand that you would like to send an e-mail notifying all the Epic watchers when it gets linked to a Story. Is that correct?
If i got it right, I would like to suggest you try Automation for JIRA plugin. You can simply customize the automation below to achieve your need:
Here's the background of the rule configured above:
- When the issue is created, the automation triggers and check if it has any Epics linked to it
- If it has, it will send a notification for all Epic watchers
P.S: Use the Smart value {{issue.watchers.emailAddress}}
to reference the e-mail address of your Epic watchers.
Let me know if this information helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was given this answer:
def issue1 = event.getIssueLink().getSourceObject()
def issue2 = event.getIssueLink().getDestinationObject()
issue1.getIssueType().getName() == "Epic" && issue2.getIssueType().getName() == "Story"
But this is not working.
Getting this error:
2019-01-14 16:57:40,514 ERROR [runner.AbstractScriptListener]: ************************************************************************************* 2019-01-14 16:57:40,514 ERROR [runner.AbstractScriptListener]: Script function failed on event: com.atlassian.jira.event.issue.link.IssueLinkCreatedEvent, script: com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.SendCustomEmail java.lang.IllegalArgumentException: The issue object was not available in the binding, perhaps called from an event handler with a non-issue event at com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.SendCustomEmail.doScript(SendCustomEmail.groovy:517)
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.