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

0 vote
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?

0 vote
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?

 

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

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
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 Monday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

588 views 6 12
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