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

Sending Escalation emails based on SLA to Organization chart

MzM February 25, 2020

Hello Team,

We've a business requirement to send email reminders/ SLA's to Organization chart.

For example, if a JIRA issue is created on Jan 1, 2020 at 13:00, then if the issue is still in the "In Progress" state after this time, the email should be sent out per below:


  1. SLA 1 (24 – 48 Hours) : Whenever issue doesn't meet SLA (assuming , Jira should be able to send email notification to assignee
  2. SLA 2 (2 Weeks): As a escalation , second email should go to assignee and his/her boss (Please note boss are not part of jira saying that, they don't have access to jira not part of the jira project so, code should be written such that it should fetch his/ her manager from organization chart)
  3. SLA 3 (1 Month): Third escalation to Assignee , his/her boss , and bosses boss..etc ( same like point #2)






Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 26, 2020

Hi @MzM ,

So this somewhat depends on what you already have on hand so far. 

Does your org chart already live inside JIRA as part of a CMDB (Such as Insight) or will this need to be fetched from a different source?

Either way I think you'll need to make some (hidden) custom fields that contain the email address of the boss and the bosses boss.

Secondly,  you can build these SLA's with the standard SLA mechanism. Most likely 3 separate SLA's.

On your Automation for that project you can add 3 triggers based on SLA Breached to send an email, as the recipient of those emails you can then set the reporter, custom field 1, custom field 2 as needed.


This is just a quick brainstorm on my own so there could be and probably will some things I have overlooked but it should give you a general idea on how to implement this.

Based on any add-ons you have or could install this might be slightly different but this should be a solid basic idea.


If you don't want to use SLA's and Automations you can always use for example Scriptrunner and run it as an Escalation Service. This will then run each x hours and check whether there are any issues that it needs to run a script for.

That script would then build the email and send it out.


This 2nd idea would be more script heavy but has less moving parts.


Hope this helps you a bit!

Like MzM likes this
Mouzam Mohammed
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 26, 2020

Thanks for the respond Dirk_Ronsmans!

FYI... We're using Azure Active Directory to authenticate Jira users so, we may need to  be fetched users mail account via script.


I like your idea's both however, I need more clarifications:

Idea 1 - are you saying to configure hidden fields and create JQL filters and subscribe?


Idea 2 -  I got it,  worth analyzing and testing let me investigate more into this by adding 3 triggers based on SLA Breached to send an email (i.e., ScriptRunner -> Listener -> Send a custom email).  Again, here also you're recommending to add hidden fields to send email?


Can't we get it by other way ( I mean, not by adding hidden custom fields) just trying to explore what other feasible options we could achieve this programmatically via script runner or code etc...

Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 27, 2020

Hi @MzM ,

Let's type this out a bit more structured :) (or at least try to)

Let's first see how you can send the mail, lets call this option A and option B.

Option A:

You create several SLA timers and set up automations to either do a fake transition which send the email or just a post function that sends an email using the internal JIRA emails or an app like JETI.

Option B:

Here we don't use the SLA timers but we set this up with Scriptrunner (or something similar) where we use an Escalation (Script Job) that runs every x hours (or days) and in that script we do a JQL that returns us all the issues that need to get a reminder.

Based on that resultset we then send out the email.


Now if we dive in to how to send the email a bit deeper we need to know who to send the email to, and there you have my idea 1 and idea 2

Idea 1: 

Not sure what you mean by subscribe.  In JIRA you can only use specific fields as recipients for an email and you cannot on the fly retrieve the value. (it would be could to have something like reporter.manager but that doesn't exist)

So what I usually do is (as a workaround) on creation of the issue to already get the values that I need (perhaps 2 custom user picker field such as reporterManager and reporterManagerManager (or what better names you can come up with))

Where you get that info from is ofcourse another thing. Are you using any app that works as a CMDB where you can store the orgchart)

Either way you will need to create (most likely) a post function or listener at creation that retrieves the values either through a webservice from a different source (such as your AD) or from a 3rd party tool that holds your orgchart.

When you have step 1 down so you have the data that is needed to send the mail then you need to look back at how you are going to send the mail.

Either use these custom fields (which contain users anyway) and use them as recipients OR use the custom fields to send them through the scripted Escalation email.

Idea 2:

Idea 2 would skip the custom fields and we would get things more on the fly but this requires more scripting.

If you use a fully scripted approach you can still use either the custom fields or on the fly data but here I would think more about a Escalation service ("cronjob") that just checks which items to process for a reminder and then script the entire email part.

If you script the entire email part you could then also retrieve the needed email addresses when you need them OR store them before hand. (that's a bit up to you, fragmented logic vs heavier script)


I hope I make a bit more sense like this otherwise I'd be happy to try and clear it up once more :) It's tricky cause you can combine multiple smaller parts to create your requirement so it's a bit pick and choose what works the best for you and again what apps you have or are willing to purchase.

MzM February 28, 2020

Thanks Dirk_Ronsmans

Thanks for your detailed inputs & for the clarification.  I like idea 2, let me explore more into this stuff by writing some scripting/ custom code. As this task is in backlog whenever I start working will keep you posted on the updates.




Boris Berenberg - Atlas Authority
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.
March 10, 2020

Looks like this is a dupe of

But the same thing I wrote there: 

We support this kind of scenario by using Notification Assistant for Jira to notify recipients pulled from an Elements Connect field for the boss / bosses boss / whatever which gets pulled from LDAP. 

Like Dirk Ronsmans likes this


Log in or Sign up to comment
AUG Leaders

Atlassian Community Events