Send notification to a specific user when a custom field value is changed

Siri Nama November 25, 2019

Hi,

I have a custom field with values 'Yes' and 'No'. In an issue, when this filed value is set to 'Yes', I want an email notification to be sent to a specific user or a group and the user or the group may not be watchers of the issue. I do not want to do this as a post function of a transition as the field is not related to any transition. How do I do it? Please help.

 

Thanks

Siri

1 answer

1 accepted

1 vote
Answer accepted
Angélica Luz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 26, 2019

Hello Siri,

Thank you for reaching out to Atlassian Community!

Reading the details you provided, I was able to create an automation that sends an email when the value of a field change. 

For this automation, it’s necessary to use an add-on called Automation for Jira (there is a free version that allows 300 transitions every month).

In this case, I used the field assignee as an example:

Screenshot 2019-11-26_15-17-30-697.png

Hope this helps!

Regards,
Angélica

Siri Nama November 27, 2019

The automation add-on is being very helpful. Thank you Angelica :)

Like Angélica Luz likes this
MzM December 5, 2019

Questions to Angélica Luz, would this add-on also work for custom fields value change  (in my case custom fields are Secure Multi User) as well?

For example i've a secure custom fields "ROwner", "RObserver" when ever the value changes in custom fields above..  email has to be send out to Rowner & RObserver same like Assignee and reporter.

Vladimir Horev _Raley_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 6, 2019

In case of custom fields - you can try Raley Emails Notifications addon. Here's an article that explains how to send an email to dynamic destination that depends on a value in custom field

Like Siri Nama likes this
Angélica Luz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 9, 2019

Hello @MzM

Yes, the add-on works for any custom fields and not only system fields.

When you select the option "Field value changed" you will see the list with all custom fields:

Screenshot 2019-12-09_10-20-49-971.png

Regards,
Angélica

MzM December 11, 2019

Thanks @Angélica Luz much appreciated for your inputs.

 

Though i got it fixed by other way via scriptrunner since my requirement is a bit tricky & complicated.. I achieved it via custom coding.

Ref ticket for persual -> https://community.atlassian.com/t5/Jira-questions/When-a-custom-field-is-updated-trigger-a-mail/qaq-p/1233308

It works perfectly as per the business requirement and it shoot email whenever ever value custom field change for priority issues. 

 

Below are the steps:

  • "Scriptrunner ->
  • Listener ->
  • Send a custom email ->
  • Events -> CustomFieldUpdatedEvent ->
  • Condition and Configuration -> {"issue.priority?.name == 'High' && cfValues['Remediation Stakeholders'] !=null"}
  • Email template -> "{add your mail template}"

Example

Dear User,

A Security Change Management has assigned/updated a High Priority Jira to you and requires your attention.

For more details, please refer to the link "$baseUrl/browse/${issue.key}"

<% if (mostRecentComment)

    out << "Last comment: " << mostRecentComment

%>

Best Regards,

${issue.reporter?.displayName}

  • Subject template -> "{add your subject template}"
  • To issue fields -> "{who need to notified, in my case Remediation Fields need to notify}".

 

Hope this helps if anyone looking for similar requirement.

Cheers

Like # people like this

Suggest an answer

Log in or Sign up to answer