SLAValue class (Scriptrunner)

Hi, I can't find the SLAValue class in the API.
I'm trying to create a scripted field which shows the SLA goal (as date&time, instead of hours remaining)
This is where i get stuck:

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.Issue;
def issue = ComponentAccessor.getIssueManager().getIssueObject("SSD-24279")
def cfm = ComponentAccessor.getCustomFieldManager();
def sla = cfm.getCustomFieldObjectByName("Time to resolution");
def time = issue.getCustomFieldValue(sla)
return time

i get an SLAvalue object which contains this data:
SLAValue{completeSLAData=[], timeline=Timeline{events=[TimelineEvent{date=2016-06-16T12:55:17.511Z, types=[START]}]}, ongoingSLAData=OngoingSLAData{goalId=28, startTime=2016-06-16T12:55:17.511Z, paused=false, thresholdData=some(ThresholdData{calculatedAt=2016-06-16T12:55:17.511Z, remainingTime=some(97200000), thresholdsConfigChangeDate=2016-05-09T12:26:51.000Z, thresholdsConfigChangeMsEpoch=1462796811489})}, metricId=5, definitionChangeDate=2016-06-15T08:09:13.000Z, definitionChangeMsEpoch=1465978152872, goalsChangeDate=2016-05-16T06:15:02.000Z, goalsChangeMsEpoch=1463379302317, goalTimeUpdatedDate=2016-05-16T06:15:02.000Z, goalTimeUpdatedMsEpoch=1463379302294, metricCreatedDate=1462796811489}

I can't import this class com.atlassian.servicedesk.internal.sla.model.SLAValue
What should I do?
Thanks!

 

1 answer

Hey,

 

Have you been able to resolve this?

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira Service Desk

Wy are we still using email for Service Desk workflows?

...attest to the experience of an urgent approval that gets lost in the boss’s inbox and requires that special “Please Approve” email or text message. In an age where we have distributed teams...

114 views 0 2
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you