Hi, I'm trying to update the request status with rest api.
ACording to https://docs.atlassian.com/jira/REST/latest/#d2e3569, I could use something like "{"update":{"comment":{"add":{"body":"some comment"}}},"transition":{"id":"71"}}" to update the request status and comment. But I always get error message:
Can not deserialize instance of java.util.ArrayList out of START_OBJECT token at [Source: org.apache.catalina.connector.CoyoteInputStream@418f2690; line: 1, column: 12] (through reference chain: com.atlassian.jira.rest.v2.issue.IssueUpdateBean["update"])
If I don't add "update" component in the updating data, i.e, only {"transition":{"id":"71"}}, then the status transition works fine. Now I need to update status and comment in two curl requests.
Maybe I need to configure 'comments' to configured to appear on the transition screen? But it seems every time I update status from Jira interface, there's always a comment field for me to input something.
Anyone could see why? Thanks!
Hi Rulin,
I think the problem with your request is that you are missing a crucial part of the json: The comment is always an array, so you will have to place it in [ ].
"{"update":{"comment":[{"add":{"body":"some comment"}}]},"transition":{"id":"71"}}"
Thanks Marten. Indeed, I need to use double array in php to represent '['.
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.