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:
Regards,
Mouzam
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...
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.
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.
Regards,
Mouzam
Looks like this is a dupe of https://community.atlassian.com/t5/Jira-Service-Desk-questions/Sending-Escalation-emails-based-on-SLA-to-Organization-chart/qaq-p/1310263#U1321561
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.