I am trying to implement a functionality to auto close few tickets which meets a criteria. I am getting the errors mentioned below while making the API call to resolve the issue.
Command I am running:
curl -D- -u admin:admin -X POST --data @oracle_decomm_close_2 -H "Content-Type: application/json" "https://jiraxx.xxxx.com/rest/api/2/issue/DECOM-40322/transitions?expand=transitions.fields"
cat oracle_decomm_close_2
{
"update": {
"comment":[{"add": {"body": "Automatic closure of Oracle decommission ticket"}}],
"worklog":[{"add": {"timeSpent":"1m"}}],
"customfield_14881":{"value": "NO"}
},"transition": {"id": "5"}
}
Error:
{"errorMessages":["Can not deserialize instance of java.util.ArrayList out of START_OBJECT token\n at [Source: com.plugenta.jiraauditor.filter.RestReadingServletRequest$1@388e8ec2; line: 1, column: 139] (through reference chain: com.atlassian.jira.rest.v2.issue.IssueUpdateBean[\"update\"])"]}
New to json. Any help on this is highly appreciated.