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

This widget could not be displayed.

Hey,

 

Have you been able to resolve this?

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

225 views 3 0
Join discussion

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