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
Have you been looking for a solution to easily create Confluence pages directly from a Jira Cloud issue? The no code solution is here with the brand new app Elements Publish to Confluence, which work...
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