How to get the value of the SLA customfield?

I'm trying to get the value of the SLA custom field but the value that is returned is an object. com.atlassian.servicedesk.internal.sla.model.SLAValue@********

5 answers

This widget could not be displayed.
Timothy Chin Community Champion May 19, 2015

If you've gotten that far, have you tried to decompile the SLAValue? There's no API for it.

i haven't tried that yet. how do you even do that?

This widget could not be displayed.
Pedro Felgueiras Community Champion Mar 24, 2016

I'm having the same problem. 

I have try to find it on any maven repositories but I didn't find the object. 

 

Do you have found solution ? 

 

@Pedro Felgueiras, Have you found a way to read the value?

 

This widget could not be displayed.

@kevin santos, Have you found a way to read it?

This widget could not be displayed.

This is the way,

CustomField cf = ComponentAccessor.getCustomFieldManager().getCustomFieldObject("customfield_xxxx”);
String v = cf.getCustomFieldType().getStringFromSingularObject(cf.getValue(issue))

How do you then decode this value, as i get it as a JSON value?

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