Hello I need to make field like a SLAs field in SD in JIra.
This field have to change the value depend on time spending and type of priority.
Blocker – 15m, 8h
High – 30m, 15h
Medium – 1d, 32h
Low – 1d, 40h.
if priority is blocker the reaction time should show 8h 15 min from create (change) the issue.
how can I do it using script runner filed
You can try something like this:
def map = [
Blocker : new TimeDuration(0,8,15,0,0),
High : new TimeDuration(0,15,30,0,0),
Medium: new TimeDuration(1,32,0,0,0),
Low: new TimeDuration(1,40,0,0,0)
def duration = map[issue.priority.name]
(duration) ? duration.toMilliseconds()/1000 as Long : null
The TimeDuration constructor is: TimeDuration(int days, int hours, int minutes, int seconds, int millis)
And the Jira duration fields expects a number of seconds as Long
Missing deadlines is one of the biggest problems every team lead wants to avoid when dealing with managed services. When the customer contracts your company to help with IT services it is expected th...
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