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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Show SLA end date


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

1 answer

1 accepted

0 votes
Answer accepted
Ivan Tovbin Community Leader Mar 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.

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 Community Leader Mar 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.

That worked beautifully, thanks a lot!

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 Community Leader Jan 08, 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.

@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 :)

@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?



@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.

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you