Hi,
In the default notification scheme there are predefined email templates for issue created, issue updated and so on. They all are file stored in JIRA with the extension '.vm' and they look cool. Unfortunately they are triggered at predefined events. I want to send similar mail when my custom events occur. That is my requirement. How do I do it with script runner?
I searched the web the best I can. i can see snippets but no where there is a template as such. Say for issue created HTMl template. My main requirement is the template similar to the issue modified email that is sent by JIRA, as that requires picking all the modified fields dynamically and printing on screen.
Your help is greatly appreciated!!!
Thanks
Arun
Hi,
I would like to create a groovy script that send an email to specific user using the VM email template (velocity)
Then I will add it as Restful endpoint to let the user use this script with their own condition
To give more explaination, some users as an excel file with user that as to be alerted when a new ticket is created, but it depends of specific field condition.
So the user will develop a script that fit with his requirement,
I will create a webhook on the creation issue, that will launch this script, and this script will use the Restfull endpoint to send the email to the specific user according to their condition
As it I will delegate a lot of scripting to the end user.
How can I develop the script to use the VM template? what function should i use?
Cyril
But if you just need the standard templates, you can just make sure your workflow function fires some event, and that you have it in your notification scheme. There are two different cases where you might need Script Runner : 1) you have a very custom email template 2) you only want to send mail on a specific circumstance, eg a transition of a high priority issue.
Can you explain more about what you requirement is?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jamie, I have similar requirement, I need to use script post function as under basic notification scheme I do not have any option to add a user in cc, so he is getting a separate email instead of main mail going to DL and he should be in cc. Can you please help on this? Thanks, Priyanka
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My company also wants to be able to use the JIRA email templates, but include all the users it's being sent to within the To/Cc fields instead of the email being sent to everyone individually. This way each member knows exactly who was sent the email. If there's a way to do this within ScriptRunner (or directly in the JIRA templates), that would be great!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm a bit confused, because in SR they are not send individually. Perhaps you are talking about the plain jira notifications?
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.