Show SLA end date

Katya Godneva March 28, 2018

Hello,

I would like to be able to show SLA end date, based on creation date. Does anyone know a way to do it?

3 answers

1 accepted

0 votes
Answer accepted
Ivan Tovbin
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 28, 2018

Hi Ekaterina,

There are a couple of ways to achieve this depending on what add-ons you have. A scripted field comes to mind or a custom field populated by some automation. If you can provide more details as to what tools you have at your disposal, I might be able to assist further.

Katya Godneva March 28, 2018

Hello, just basic tools, usual.

I'd like to do it with basic tools. If you have scripts in mind could you please provide some documentation, as I don't have much experience here.

Ivan Tovbin
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 28, 2018

Assuming you have Scriptrunner addon, create a scripted field using 'Date Time picker' template. Use this code for your field:

import java.sql.Timestamp

Long created = issue.getCreated().getTime()
Timestamp slaEnd = new Timestamp(created + 24*3600*1000)
return slaEnd

This'll add precisely 24 hours to your issue created date and return the result in your field. 

Add this field to the needed screens and also make sure you set field's searcher to Date Time Range picker.

Katya Godneva March 29, 2018

That worked beautifully, thanks a lot!

Doğucan Baskın January 7, 2019

Hello @Ivan Tovbin

 

I think this solution is for the Server version. Is there a way to set this up for Cloud version? We have Automation for Jira plugin if that helps.

 

Thanks in advance!


Kind regards :)

Ivan Tovbin
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.
January 8, 2019

@Doğucan Baskın

I suppose it's quite possible with Automation addon. You need to create a date picker custom field and them populate it with Automation. You might need to use math functions that Automation supports, to calculate the resulting value for your field.

Doğucan Baskın January 8, 2019

@Ivan Tovbin

Thanks a lot for your very fast response!! :) I created the field as you mentioned and wrote an Automation rule. When issue is created it edit's the date picker field with the following formula.

{{issue.created}} + {{#issue.SLA's.fromString.toDate}}longDate{{/}}

However I think the second part of my rule is not working because the Due date is always {{issue.created}}right now. It doesnt add the SLA on it. Do you have any suggestions? 

Thanks again :)

Aaron Whigham May 1, 2019

@Ivan Tovbin 

When you added :

Timestamp slaEnd = new Timestamp(created + 24*3600*1000)

to add 24 hours to the created date to get your slaEnd,  This 24 hours does not account for the SLA Calendar work hours.  It adds 24 actual hours to the created date.

Are you able to account for Calendar work hours?

 

Respectfully

Leontien February 5, 2020

@Ivan Tovbin 

Is it possible to answer Aaron Whigham's question? For me it is also important that the slaEnd takes the calendar working hours into account.

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.
March 7, 2021

Hi @Doğucan Baskın ,

I believe by SLA end, you mean the target date of the SLA - the last moment that the SLA end condition should be satisfied.

For this, you can use Time to SLA Cloud

It has a feature called the SLA target date custom field, which lets you populate a date-time picker type custom field of your choosing with the target date information. This target date also includes the SLA calendar and the SLA pause times (if there are any).

You can later use this field in searches, gadgets, and reports.

Time to SLA works with Jira Service Management, Software, and Business projects.

Screen Shot 2021-03-07 at 22.04.49.png

Please let me know if you have further questions.

Cheers,

Gökçe

Please note that I'm one of the members of the Snapbytes team who developed the Time to SLA app.

0 votes
Sergey Karaev March 4, 2021

Adding the Time to the Created gives some abstract time, not the SLA end date, you need to consider the Calendar (Working time + weekends).

Suggest an answer

Log in or Sign up to answer