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

How to create an SLA with a separate after hours goal?

Greg Hart September 13, 2020

Relevant details:

  • JSD Cloud
  • We use a custom field called "Support Portal Priority" instead of the standard Priority field, since we cannot use customized priorities per project
  • Our standard calendar is 9-5 M-F.

Our team has a goal of responding to tickets with a "Support Portal Priority" of Highest within 1 hour, however that goal changes to 4 hours if a ticket is received outside of standard calendar hours.

I know it's impossible to use JQL to query the hour of the day a ticket was entered, so I can't filter my SLA using that method. 

How can I create a Time to First Response SLA with two separate goals for Highest priority tickets based on the time of day the ticket was entered?

2 answers

1 accepted

2 votes
Answer accepted
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.
September 15, 2020

@Greg Hart ,

I'm not sure what you want is actually possible using just the SLA goals and splitting the calendar.

I'm thinking of something else perhaps a bit of a workarround.

 

Let's say you have a "Support Portal Priority" of "High" and this can be created both inside or outside of business hours. For your use case you would want a different goal based on the time of creation.

I'm then thinking of using an additional field (that is hidden to the end user (and maybe even the agent)) which you can set through perhaps the Automation/an automation plugin.

My idea is as follows:

- Create a flag/boolean/custom field called "Created Outside of Business Hours"

If the ticket is created within the business hours this is set to False

If this ticket is created outside of the hours it is set to True

 

You can then use that additional parameter to create 2 goals.

e.g.

Support Portal Priority = "High" AND "Created Outside of Business Hours" = False Then the goal is 1hr (using a calendar of 9-5)

Support Portal Priority = "High" AND "Created Outside of Business Hours" = True then the goal is 4hrs (using a calendar of 5-9)

If you want the goals to continue to count even outside of the calendar you can just make a 24/7 calendar but based on the custom field value you can set a different goal.. 

Cause that would only change the goal based on the custom field value (which in return is a reflection of the time of day created)

 

Thats my 2cents and how I would solve this :) 

Gökçe Gürsel {Appfire}
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
September 15, 2020

True :) Thank you for pointing this out.

Like Dirk Ronsmans likes this
Greg Hart September 15, 2020

@Dirk Ronsmans How could I calculate such a bool field in JSD Cloud? 

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.
September 15, 2020

Hey @Greg Hart ,

With an addon like Scriptrunner you could write a small script that compares the now() value (or the issue.created value with a predefined value (like > 9am but <5pm).

i'm checking now whether this is also possible with the built in automation.

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.
September 15, 2020

@Greg Hart ,

I played arround a bit with the timefunctions in Automation and came up with the following: (is this perfect or the only way, no. But will this work, normally yes :))

I created an automation with:

Trigger: Issue Created

Condition: Advanced compare {{now.format("HH")}} greater than 8

(this returns the absolute hour in 24h format) meaning that 8.59 will still be false but 9.00 is true)

image.png

and 

Condition: Advanced compare {{now.format("HH")}} less than 17 (thats 5PM) so 4.59 is ok, 5pm not

image.png

Action: set a field.

 

I ran this as a manual trigger as a test and it works fine. I did use the 24h format as it's easier to distinguish between 5am and 5pm (5 vs 17) instead of having to find whether it's am or pm (and i use 24h clocks all day so :))

 

Hope this helps!

 

image.png

 

of course change this to issue created as a trigger and set the field you want to set in the end.

Based on that you should be able to define your goal then for your SLA

 

Edit: if you have issues with the time being wrong take a look at timezones.

https://support.atlassian.com/jira-software-cloud/docs/smart-values-date-and-time-functions/ 

you could replace the {{now.format("HH")}} with {{now.convertToTimeZone(AEDT).format("HH")}} if i'm not mistaken. (and you can find a list of timezone abreviations here 

Greg Hart September 15, 2020

@Dirk Ronsmans This is perfect! Trying to sell The Powers That Be on spending more money on yet another add on was going to be a chore. We've been using this version of automation for a while now, so this works out how I need it to. Thank you!

Like Dirk Ronsmans likes this
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.
September 15, 2020

Be sure to test it first ofcourse cause I'm just throwing this together as we speak :)

But my initial testing seems ok! (i added a small part about timezones should you need it)

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.
September 21, 2020

Hey @Greg Hart ,

Just to follow up on this @Jack has a nice approach to this one without any automation.

https://community.atlassian.com/t5/Jira-Service-Desk-questions/Need-help-setting-SLA-Goals-based-on-working-hours/qaq-p/1485574 

You could indeed use a more complex but refined SLA Goal JQL using the StartOfDay() clause

priority = highest and createddate >= startofday(“+8h”) and createddate < startofday(“+17h”)

This would eliminate the need for the automation all together.

Greg Hart September 21, 2020

I thought about trying that, but figured since startOfDay() and endOfDay() were always based on the current day, that would cause issues with viewing SLAs in the following days. But now that I think about it, I guess those functions would only be run when the SLA is initially calculated.

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.
September 21, 2020

Also true.. 

Initially it might not cause issues but there will be one if you have to recalculate the SLA's..

0 votes
Gökçe Gürsel {Appfire}
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
September 13, 2020

Hi @Greg Hart

You can enter a separate calendar for out of business hours like this:

Screen Shot 2020-09-14 at 09.33.32.pngThen you need to define separate goals with this new out-of-business-hours calendar with your JQL conditions.

The above screenshot is for sample 9-5 calendar, as you can see I had to split the calendar into two parts. You can adjust the calendar based on your working hours calendar.

You also need to create a boolean cf to separate tickets that created out-of-business hours. Thanks @Dirk Ronsmans :)

Let me know if you have further questions.

Cheers,

Gökçe

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.
September 15, 2020

@Gökçe Gürsel {Appfire} ,

While I agree you would need to define 2 calendars (one  for business hours one for outside) how would this work when having the same condition on the goals?

for example if you have a "Support Portal Priority" of "High" and you link them to both the business and outside of business hours calendars wouldn't they just both be active?

One will then be paused during the time it's not valid and the other one would run.

But this would not be valid against the time of the issue creation imho.

Once you cross over from business to outside or the other way arround this would get very confusing.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events