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 Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,307 views 14 20
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot