I am getting this error when sending a PUT request rest/api/2/issue/issueKey
{"errorMessages":["Can not deserialize instance of com.atlassian.jira.rest.v2.issue.IssueUpdateBean out of START_ARRAY token\n at [Source: org.apache.catalina.connector.CoyoteInputStream@56413a53; line: 1, column: 1]"]}
Request body is:
{
"update":{
"customfield_10802":[
{
"set":{
"value":"ja"
}
}
]
}
}
Any Ideas ?
Hi @Florian Bonniec ,
- this is the payload :
{
"update":{
"customfield_10802":[
{
"set":{
"value":"ja"
}
}
]
}
}
and this is the field definition :
{
"customfield_10802": {
"required": false,
"schema": {
"type": "option",
"custom": "com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons",
"customId": 10802
},
"name": "Zeuspunkt",
"fieldId": "customfield_10802",
"operations": [
"set"
],
"allowedValues": [
{
"self": "https://example/rest/api/2/customFieldOption/108086",
"value": "ja",
"id": "108086",
"disabled": false
},
{
"self": "https://example/rest/api/2/customFieldOption/108087",
"value": "nein",
"id": "108087",
"disabled": false
}
]
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How this payload is generated ?
Do you do in in code or do you try using a tool such as Postman ?
Seems like there is a special character somewhere or encoding issue.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I use code. More specifically, I use the Google Ouath client to perform the PUT request.
Something like the following code snippet:
public void updateJiraIssue(String issueKey, String jiraAccesstoken, String verfifier) throws JiraConnectionException {
ObjectMapper mapper = new ObjectMapper();
ObjectNode bodyNode = mapper.createObjectNode();
ObjectNode updateNode = bodyNode.putObject("fields");
bodyNode.putObject("update");
ObjectNode customfield_10802 = mapper.createObjectNode();
customfield_10802.put("value", "ja");
updateNode.set("customfield_10802", customfield_10802);
try {
OAuthParameters parameters = jiraOAuthClient.getParameters(jiraAccesstoken, verfifier, consumerKey, privateKey);
final HttpContent content = new JsonHttpContent(new GsonFactory(), bodyNode);
putRequest(parameters, new GenericUrl(baseUrlIssue + issueKey), content).get();
} catch (Exception e) {
e.printStackTrace();
log.error("Error while handling request to {}", baseUrlIssue, e);
throw new JiraConnectionException("Error handling request when update issue by id.", baseUrlIssue, e);
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.