Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Failed Rest-Using API to Update Resolution

Michaiah_Gartner December 18, 2018

Every time I try to use this code to change a resolution on a ticket:

 

{  "update": {
        "transition": {"id": "45"},
        "fields": {
            "resolution": {"name": "Done"}
        }
    }

 

I get this response:

 

{"errorMessages":["Can not deserialize instance of java.util.ArrayList out of START_OBJECT token\n at [Source: org.apache.catalina.connector.CoyoteInputStream@61704a22; line: 2, column: 9] (through reference chain: com.atlassian.jira.rest.v2.issue.IssueUpdateBean[\"update\"])"]}

 

What does this mean and how can I fix this issue?

1 answer

1 accepted

2 votes
Answer accepted
Andy Heinzer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 18, 2018

Which specific rest endpoint are you calling when you get this error?  If you're calling the POST api/2/issue/{issueIdOrKey}/transitions endpoint as I suspect, you should have the 'transition' and 'fields' parameters on the same level as 'update', and not nested within the 'update' tag itself.

Another user had the same problem in the thread  https://community.atlassian.com/t5/Jira-questions/Unable-to-use-JiraRestClient-or-rest-api-to-transition-issues/qaq-p/257066  Props to @Penny Wyatt (On Leave to July 2021) for the stellar answer there.

I hope this helps.

Andy

Michaiah_Gartner December 18, 2018

Thank you, this worked. I realized I did not have the correct URI as well. 

Suggest an answer

Log in or Sign up to answer