REST API Transition Error - Field 'resolution' cannot be set

marc.fessler April 24, 2020

I've seen a few issues on the web about this, but I'm pretty sure I've ticked all the boxes regarding screens and JSON. But not sure.

I'm trying to call a transition via the REST API from PowerShell to set a status of Done for a Jira subtask. I can set the status manually via the web portal and the screen seems to be set up correctly.

When manually setting the subtask to Done, the screen has a dropdown for Resolution and Done is an available value there.

When I GET the available transitions and expand fields I can see the transition has a mandatory field resolution with a value of Done as an option. And resolution is the only mandatory field.

Here's the JSON I'm sending

{
"transition": {
"id": "31"
},
"fields": {
"resolution": {
"name": "Done"
}
}
}

However when I submit the request via either Invoke-WebRequest or Invoke-RestMethod I get an error

Invoke-WebRequest : {"errorMessages":[],"errors":{"resolution":"Field 'resolution' cannot be set. It is not on the appropriate screen, or unknown."}}

Any ideas what I'm doing wrong?

1 answer

1 accepted

1 vote
Answer accepted
marc.fessler April 27, 2020

Got it, I wasn't using the correct URI. Forgot to append transitions.

Needs to be

https://jira_server/rest/api/2/issue/issue_id/transitions

Suggest an answer

Log in or Sign up to answer