Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to create a email trigger when a transition is moved


Hi Team,

I have a requirement that I have two statuses called Pre-milinary and Active and I have a user picker field called Approver.

When my status is moved from Pre-milinary to Active according to approver list users get notified (via email) that this ticket is waiting for your approval.

I want to achieve this via script runner but I am not good with groovy scripting. Can someone help me out with a sample script so that I can edit according to my requirement?

Your help on this much appreciated. Thanks in advance.



2 answers

1 accepted

1 vote
Answer accepted

I think is probably most of what you need.

Thanks for the response.

I will try to modify this script according to my requirement and will let you know if I face any issues.




I hope you are doing great!

I have tried the script which is given by you and it is executed successfully.

Thanks for the script. I have a request that for test purpose I have given my email id at the end, but the problem here is we have many approvers to be included in the script adding to the users and removing the users IDs everytime is not a good practice.

So I want to add "Approver" field in the script so that email will be sent according to the Approver field list. So how can I Modify the script according to my requirement?



Hmm.  Assuming your approvers are service-management approvers, then you could combine the email script send with


Nope, my approvers are not service-desk approvers.

I just want to add something here that how can we get the issue I'd everytime whenever a transition is done?



0 votes
Pramodh M Community Leader Dec 23, 2021

Hi @kanaka prasad ponnuru 

Why Scriptrunner?

You can achieve this via Custom events.

Create a custom event and add the relevant people to Notification Scheme.

Add the Event in Workflow Transition from Pre-milinary and Active to trigger the Notification to the users you have specified in Notification Scheme.


Hi Pramodh,

Actually our client is more preferable to script runner. Is it not possible to achieve this via script?

If we can achieve this via custom event would  you be able to  give the detailed steps?



Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira

Do you use Jira Cloud with Microsoft Teams?

Hi, Jira users! Do you use Jira alongside Microsoft Teams? We want to hear how you’ve used the power of Jira Cloud and Microsoft Teams (via the Jira Cloud for Microsoft Teams app) to achieve a team...

17 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you