Use with Rest API

Hi I am having an issue using the plug-in with the rest API, specificlly updating it, when I attempt to do so I get an internal server error indicating

at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassCastException: com.atlassian.jira.issue.customfields.option.LazyLoadedOption cannot be cast to java.lang.String
at com.atlassian.jira.issue.customfields.impl.rest.TextCustomFieldOperationsHandler.getInitialValue(TextCustomFieldOperationsHandler.java:46)
at com.atlassian.jira.issue.customfields.impl.rest.TextCustomFieldOperationsHandler.getInitialValue(TextCustomFieldOperationsHandler.java:17)
at com.atlassian.jira.issue.customfields.impl.rest.AbstractCustomFieldOperationsHandler.updateIssueInputParameters(AbstractCustomFieldOperationsHandler.java:78)
at com.atlassian.jira.rest.v2.issue.IssueInputParametersAssembler$IssueInputParametersBuilder.finalizeIssueInputParams(IssueInputParametersAssembler.java:449)
at com.atlassian.jira.rest.v2.issue.IssueInputParametersAssembler$IssueInputParametersBuilder.buildForEdit(IssueInputParametersAssembler.java:202)
at com.atlassian.jira.rest.v2.issue.UpdateIssueResource.editIssue(UpdateIssueResource.java:36)
at com.atlassian.jira.rest.v2.issue.IssueResource.editIssue(IssueResource.java:790)

Does the plugin support use with the Rest API?

Jira 5.1 I have tried updating using both the fields and updata formats

{"fields"=>{"customfield_10056"=>10101}}

and

{"fields"=>{"customfield_10056"=>"yellow"}}

both give me the same error.

2 answers

Things seem to be working fine on the creation using the post method, but not the Update method using Put. Can anyone tell me how these are different?

I'm in the same boat, getting errors when trying to update a traffic light value through rest.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 31, 2018 in Marketplace Apps

Marketplace Spotlight: Zephyr

Hello Atlassian Community! Each month, we run a series of Spotlights to highlight Marketplace vendors and apps that our team thinks this Community would find valuable. In last month's Spotlig...

335 views 0 1
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