My coding experience with scriptrunner is bad. I have been looking for solution for this problem couple weeks now and I just can't get it sorted.
First user wanted watchers to be add to issue if issue security level is specific. Luckily @PD Sheehan has been helping.
I just want to get email notification in some way when issue is created and it's security level is "Dangerous" (issue security level id is '10200').
Best solution is of course solution where email notification is sent always when security level is changed to this "Dangerous".
I can use scriptrunner scripts and we have Automation Lite in use, but so far Scriptrunner seems to be better to begin with.
Here is how I would approach the entire problem
This setup will let you control the distribution of those email on a per-project or per-notification scheme basis.
The downside is the inability to use custom text in the email. I'll offer some options below.
First the condition script:
issue.securityLevelId == 10200 && changeItems.any{
it.field == 'security'
}
If you want a more custom email and you don't have another add-on that can listen to jira events (like JEMH), you can use another scriptrunner listener: Send a custom email
The nice thing here is that you can create multiple of such send email events with different parameters and configuration. But the bad thing is that you have to maintain it separate from the standard notification scheme.
Another option would be to skip #1-3 above and just go with a send a custom email listener with the same code I listed above.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.