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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

357 views 0 6
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