How to add automation rule that sends email notification if task created Off-Business Hours

Ernest Kurmel May 15, 2023

Hello, I want to create automation rule, that sends email notification for reporter if task is created off-business hours, and in mail message I want to show my customer, when we will start work, so question: if it is possible to show through smart values when my SLA will start running. 
For example today is sunday, and after I created a ticket, autoreply sends me mail like this:
Hello, you have registered request outside working hours, we will start work on 5/17/2023 8:00 AM

The rule should also see holidays that I added in SLA calendar.

Now I have created rule:
1. When: Issue created
2. SLA does not equal 
SLA1 I-V 08:00-18:00
3: Then: Send email 
subject: {{issue.summary}}
Content: Here I want to insert smart value, to show my reporter when our SLA will start work.


1 answer

0 votes
Walter Buggenhout
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 16, 2023

Hi @Ernest Kurmel,

Assuming that you have set up your SLA with an SLA calendar with business hours defined, there is an advanced JQL function that you can use to determine whether an issue is created during those business hours and incorporate that in your automation rule like this:

  • Trigger: issue created 
  • JQL Condition: "SLA1 I-V" != withinCalendarHours() (see this support article for more information on that function)
  • Action: Send email. 

While I haven't found a smart value to read calendar hours from the SLA calendar, I would assume it should be possible to just use conditions to determine what you should include as working hours on the ticket, no? I would suspect that you can use the same conditions you use in your SLA settings to determine the SLA targets for your tickets.

Hope this helps!

Ernest Kurmel May 16, 2023

Hello @Walter Buggenhout ,

Thank you for answer,
The JQL condition that you have written is similar to mine, so it is not necessary for me to change it, because it's working fine.
The one more issue I have is time scope
The automation should not take the lunch time (between 12:00PM to 01:00PM)
How can I define that with JQL filter? 

Walter Buggenhout
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 17, 2023

Hi @Ernest Kurmel,

If you use an SLA calendar in your JSM project that looks like this:

Screenshot 2023-05-17 at 09.06.19.png

i.e. you specify your lunch break in the SLA calendar, then you can update your JQL condition to the one I shared previously. It will take your lunch break into account, as the SLA timer will be paused automatically outside office hours.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events