I'm trying to transition a jira Issue while updating fields within the transition. This command works to transition the issue but there are extra fields that need to be updated.
curl -u [user]:[pwd] -X POST --data "{"""transition""":{"""id""":"""11"""}}" -H "Content-Type: application/json" https://jira/rest/api/2/issue/ABC-10122/transitions
But this one throws an error
curl -u [user]:[pwd] -X POST --data "{"""transition""":{"""id""":"""11"""},"""fields""":{ """customfield_18420""":"""Yes"""}}" -H "Content-Type: application/json" https://jira/rest/api/2/issue/ABC-10122/transitions
Error: ({"errorMessages":[],"errors":{"customfield_18420":"Could not find valid 'id' or 'value' in the Parent Option object."}})
If I look at https://jira/rest/api/2/issue/ABC-10122/transitions in a browser there are two options: id: 11 = Submit or id: 41 - Cancel
https://jira/rest/api/2/issue/ABC-10122/transitions?expand=transitions.fields - Shows me all the extra fields like:
"customfield_18420": {
"required": false,
"schema": {
"type": "option",
"custom": "com.atlassian.jira.plugin.system.customfieldtypes:select",
"customId": 18420
},
"name": "Update?",
"fieldId": "customfield_18420",
"operations": [
"set"
],
"allowedValues": [
{
"self": "https://dev-jira/rest/api/2/customFieldOption/21760",
"value": "No",
"id": "21760"
},
{
"self": "https://dev-jira/rest/api/2/customFieldOption/21761",
"value": "Yes",
"id": "21761"
}
]
},
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.