Trouble with Custom Field Value - incompatible argument types

Using method found on this forum: 

 

CustomField cf1 = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Time to resolution");
Double cf1Value=null;
cf1Value=(Double)issues.getCustomFieldValue(cf1);
log.debug (cf1Value);

 

Getting this error:

No signature of method: java.util.ArrayList.getCustomFieldValue() is applicable for argument types: (com.atlassian.jira.issue.fields.ImmutableCustomField) values: [Time to resolution]

 

Any ideas?

1 answer

0 votes
Micky Caritte Community Champion Dec 01, 2017

Hi Kaytlin,

As mentioned by the stack trace, there is no getCustomFieldValue() method available on the Java Type ArrayList. That's just a typo from "issue" to "issues" I guess. 

While issues might refer to multiple issues, each must be evaluated separately (or if you're looking at a single one, you can just change for "issue").

Hope this helps!

Cheers

Thanks! That did help, now seems like the obvious answer but I was too close to the issue to see it. Getting closer!

Still having trouble getting the value I need but I think that's just because the custom value (and created by someone who has since left us) is really complex. The custom field does some calculation to find out how much time has elapsed from when the issue was created to when it was resolved. 

May be back here to see what you think once I get my head around it more.

Thank you again!!

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 ...

2,798 views 11 18
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