I am trying to add 4 hours to Created date time to a custom SLA (Due Date) field.

Jaya Sharma
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 26, 2022

I have a custom SLA(Due Date) field, which should get calculated based on Priority.

So I  have

def int dt = 0
if (issue.getAsString("Priority").equals("Urgent"))
{dtprd = 4}
else if (issue.getAsString("Priority").equals("High"))
{dt = 24}
else if (issue.getAsString("Priority").equals("Medium"))
{dt = 96}
else if (issue.getAsString("Priority").equals("Low"))
{dtprd = 240}
else if (issue.getAsString("Priority").equals("Unknown"))
{dt = 240}
else {dt = 8760};

issue.get("created") + dt


it seems to work for high, medium, low and unknown. But for the urgent where i have 4 hours, it doesn't change the time. It just stays at the created date/time. How can I get the Urgent to have created time + 4 hours? Any help would be greatly appreciated. Thank you.



0 answers

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events