How to set email notification on change in security level field

Jawahar Sinha September 18, 2019

Hello experts,

In my project, I would like to setup a email notification to the project lead whenever a user updates the security level within an issue of the project. Can you please let me know how I could achieve this?

I did look at post function for workflow which could trigger a custom event and can inturn trigger an email to appropriate group/user but I dont know how do i capture the change of security level field and then trigger a custom event.

Looking for your help and guidance on this. Thanks!

- Jawahar

2 answers

2 accepted

0 votes
Answer accepted
Andrew Laden
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.
September 18, 2019

You can also use the automation for jira addon that you can set to watch for a specific field being update and either fire an event or send a mail based on that.

Jawahar Sinha September 19, 2019

Thanks Andrew.

This plugin is indeed helpful but I will need to explore if my organisation is willing to procure a license for the same.

Thanks much!

0 votes
Answer accepted
Ravi Sagar _Sparxsys_
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.
September 18, 2019

Hi @Jawahar Sinha 

Few ways of doing it. To keep it generic you can rely on Issue Update event which will be triggered on all updates and in the email template you can see the field change.

For capturing the security level change only. Put the field on a transition screen only (not on create/edit screen) and show this screen using a status with global transition. Then you will have a button always available in your issue. Also on that global transition post function trigger your custom event and eventually capture it in the notification scheme.

I hope it is not confusing.

Ravi

Jawahar Sinha September 19, 2019

Hi Ravi,

I did not get your second part about capturing security field. Currently, I have security Level system field visible in Create/Edit/View screens and I want if a user changes security level in this field may be on Create (changing from default to some value) or on Edit (from e.g. Security Level Value 1 to Security Level Value 2), then I want an email to be triggered. I did not understand adding a field on transition screen only. 

Can you please further elaborate for me. Please pardon my ignorance if this is obvious which I did not understand.

Andrew Laden
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.
September 19, 2019

I've used that technique before, so I'll try to explain. Its a bit convoluted because it touches a few things.

There are really 4 different types of screens. Create, View, Edit, and transition. You can update field values on 3 of them (create, edit and transition)

What you want to do is only make the "Security Level" field appear on a transition screen. So you remove it from the create screen and the edit screen. Leave it on the view screen. This does mean you will be unable to set the security level during the issue creation. Sorry, but that's the limitation of this method.

You then create a screen called "Set security level" The only field on this screen is the security level field.

While you are at it, under System->events, Create a new event called "Security Level Updated." Then update your notification scheme for your project to say who should be notified when event is triggered.

In the workflow for your issue, you add a transition (call it "Update Security Level") the source is "Any Status" and the Destination is "Itself" You set the screen to be the "Set Security Level" screen you made before. In the post function of the transition, change the event that is fired from "Generic Event" to "Security Level updated"

So once the ticket is created, if the user want to change the security level, they can run the "Update Security Level" transition, which will pop up a screen to allow them to enter the new security level. It will then fire a "Security Level Updated" event, which will notify whoever you have defined in the notification rules. It will then put the issue back in the same status you started from.

Like i said, its a little convoluted, and will require a little training to the users. But it can be done with no addons.

Like Jawahar Sinha likes this
Jawahar Sinha September 24, 2019

@Andrew Laden Thankyou so much for a detailed explanation. This is helpful and exactly what I wanted.

Suggest an answer

Log in or Sign up to answer