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?


1 answer



Have you been able to resolve this?

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

Looking for anyone who made the switch to Data Center

The Jira Marketing team is putting together an ebook on migrating to Data Center. We're looking for pro tips on how you staffed your project team and organized your Proof of Concept. Share yo...

34 views 0 2
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