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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


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

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