Use with Rest API

Andrew Nisbet October 1, 2012

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

0 votes
Jimmy Woestman June 27, 2013

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

0 votes
Andrew Nisbet October 1, 2012

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?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events