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
Unless you have an alternative solution.
There is currently a bug (https://productsupport.adaptavist.com/browse/SRJIRA-2690) with the "Send custom email" listener so this will not work correctly.
When the bug is fixed though, this is how you would accomplish your goal.
def issue1 = event.getIssueLink().getSourceObject()
def issue2 = event.getIssueLink().getDestinationObject()
issue1.getIssueType().getName() == "Epic" && issue2.getIssueType().getName() == "Story"
This will fire every time a new link is created between two issues, check if its a story linked to an epic, and if it is send an email to all the watchers.
Can you explain how to create Send custom email listener for Adaptivist? I am not seeing that option.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Navigate to the Script Listeners page, click Add new item. The Send custom email option should be in the bottom right.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks. I see that option, but I am not able to find the event: IssueLinkCreatedEvent
It is not showing in the Even list.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What version of JIRA and SR are you using?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The IssueLinkCreatedEvent got added in JIRA 7.5. You would need to upgrade if you want to use it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Getting this error:
Time (on server): Mon Jan 14 2019 11:57:40 GMT-0500 (Eastern Standard Time)
The following log information was produced by this execution. Use statements like:log.info("...") to record logging information.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The solution provided is not working. It is marked as Accepted Answer, but it is not working. Please assist.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
Register NowOnline 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.