Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Sending email notification after updating custom field

tejraj_123 April 20, 2022

Dear All,

Do you know if it is possible to send a defined email notification to a user when a specific custom field is modified/Changed  (Due date)? using server version

3 answers

2 votes
Antoine Berry
Community Champion
April 20, 2022

Hello @tejraj_123 ,

If you are using ScriptRunner, in addition to what Craig said, you could also use the "send a custom email" Listener, on the "Issue Updated" event, with this condition : 

event?.getChangeLog()?.getRelated("ChildChangeItem")?.find {it.field == "duedate"}

 You will be able to configure projects, mail content and address etc. in the UI : 

send mail listener.png

Craig Nodwell
Community Champion
April 20, 2022

@Antoine Berry  -- Perfect follow through!!

Like Antoine Berry likes this
tejraj_123 April 20, 2022

Hi @Antoine Berry ,

I'm new to the Scriprunner, Can you please post the Script here. my requirement is If any change in 'Due Date' field in 'XXXX' Project , a notification should be sent to XXXX person.

 

Thanks,

Tej.

Antoine Berry
Community Champion
April 22, 2022

Hello @tejraj_123 ,

If you try to create a listener, select "Send a custom email", you will be able to configure it. If you check my screenshot above, you can see that you can select the project. 

The snippet should evaluate to true if the due date is changed, on the "Issue Updated" event (i.e. edit mode - you can add more events).

Then it is up to you to customize the mail template, the addresses...

Please check the documentation for more information. :)

1 vote
Craig Nodwell
Community Champion
April 20, 2022

Hi @tejraj_123 

Do you have any plugins available to leverage?
Re: Automation for Jira/Scriptrunner...

Asking here because you've listed this as the server product and without the Jira Automation plugin installed @Fabian Lim's suggestion won't help you.
It's a great plugin by the way, and will work exactly as described by Fabian.
So is scriptrunner... although the approach would be different.

If you could provide some more details that would be a great help for one of us to help you further.

Thanks

-CN 

tejraj_123 April 20, 2022

Hi @Craig Nodwell 

Yes, I've Scriptrunner Plugin.

Thanks,

Tej. 

Craig Nodwell
Community Champion
April 20, 2022

Hi @tejraj_123 have a review of this page.

Scriptrunner send_a_custom_email 
Let me know if you get stuck.

Thanks
-CN

Craig Nodwell
Community Champion
April 20, 2022

Here's an example from the Scriptrunner Library:
Adaptavist Library send-custom-email 

0 votes
Fabian Lim
Community Champion
April 20, 2022

Hi @tejraj_123

Yes it's possible via Jira Automation.

Trigger - Field Changed for due date

Action - Send email notification

This video shows you how to create customized email notifications: https://youtu.be/ccWTIgdnQqE

Regards,

Fabian

tejraj_123 April 20, 2022

Hi @Fabian Lim ,

Thank you for the quick response, Unfortunately, we don't have the Automation for the Jira plugin. I Believe this is possible with the Scrip runner plugin  Can anyone please help me with the script.

   

Fabian Lim
Community Champion
April 20, 2022

Looks like @Craig Nodwell took care of you.

Cheers

Suggest an answer

Log in or Sign up to answer