Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Notification Based on Generic Event

Sharon Porat November 20, 2022

Hi,

I would like to send a notification when specific fields are updated (and not any update event) for example only Priority changed to Urgent or Red Alert, if it was changed to medium or high, don't send an email.

I tried to create a custom event and add it to the notification scheme, but no email was sent.

I would appreciate your advice.

 

Thanks in advance,

Sharon

2 answers

1 vote
Rilwan Ahmed
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 20, 2022

Hi @Sharon Porat ,

Welcome to the community !!

In the native Jira server, you cannot achieve the requirement. You can make use  of Automation for Jira add-on to achieve this. 

i.e. When == Issue updated

If == Add JQL condition

Then == Send Email

To know more about available triggers, conditions, actions go through https://confluence.atlassian.com/automation/components-in-jira-automation-1141480614.html

Sharon Porat November 20, 2022

Hi, Thanks for your answer.
I tried to fire an event with Automation for Jira (that will send the notification) because the mail function is not available to our version (we are still using the Jira server and not Jira cloud) 

However, I tried to use ScriptRunner to send an email, but it send a custom mail and not a "Notification mail" that highlights the changes that were made

1 vote
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 20, 2022

Hi @Sharon Porat and welcome to the community,

You can't do per se what you ask in the sense that notifications are being sent to specific events and not on CF updated events. If you want to use the notification scheme to do that, then what I propose to do is:

  • Make your fields readonly
  • Add self transitions to edit these fields
  • On these transitions instead of firing the generic event, fire your event
  • On your notification scheme add who ever you want to get notified when the above event will fire

Let me know if that helps.

Sharon Porat November 21, 2022

Hi, thanks for your answer. 

 

it's worked. however, I am not sure it can be part of the daily process. I don't want to add a new transition for editing an item, it won't scale

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 21, 2022

@Sharon Porat this shouldn't be a part of you daily process. I don't quite understand that to be honest... why this should be a part of your daily process? This should clearly be a part of your jira solution.

The scalability thing you mention fails from your own foundation. You can't be serious about thinking scalability when you add such micro management to your solution in Jira. Perhaps the thing you are asking can be done (and be scalable as well) to other platforms. But since you are dealing with Jira and since the latter doesn't have such granularity, it will have huge maintenance.

You could add jira automation rules (and have hundreds of them if you want) and add as trigger "when field change" then send email to specific users.

But again the above will increase your maintenance. You get my point?

Sharon Porat November 21, 2022

Hi @Alex Koxaras _Relational_ ,

The goal is to reduce irrelevant notifications. i.e. not every update event is interesting and should fire a mail. Each of my developers gets hundreds of miles a day and only half needs his attention.  For example, only if Priority changed to Urgent or Red Alert send the notification,, if it was changed to medium or high don't send it.

Therefore, I want to control on which fields that are being edited will send a notification mail. is it make sense?

 I tried to use ScriptRunner to send an email, but it sends a custom mail and not a "Notification mail" that highlights the changes that were made

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 21, 2022

@Sharon Porat 

What I would do in your case then is:

  • Create a bunch of different events based on whatever template you want (e.g. generic or issue created or whatever)
  • Write a listener which will gets trigger on field changes
  • Use the dispatchEvent() (com.atlassian.jira.event.issue.IssueEventManager) to trigger the event you want and sent out notifications based on the notification you will prepare.

Let me know if the above is clear.

Sharon Porat November 23, 2022

Hi @Alex Koxaras _Relational_ , sorry but I am not sure how should I use the dispatchEvent()? can you please elaborate on that?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events