Hello folks,
I'm trying to transition a Jira issue via REST API. However, I keep getting 400 response.
POST: `https://xxxxxx/rest/api/3/issue/<issue_id>/transitions`
Header: Content-Type: application/json
Auth: Basic <user>:<token>
Body: `{"transition":{"id":<id>}}`
Expected: 204
Actual: 400 (Bad Request) `Transition Id <id> is Invalid
I have verified that the <id> is available via the `statuses` endpoint:
GET: https://xxxxxx/rest/api/3/status/<id>
Response: 200 (With the status detail)
Surprisingly, I was able to set the Issue status to the expected value manually via dropdown and verify via the GET api that the value is indeed the one I'm trying to set above.
GET: https://xxxxxx/rest/api/3/issue/<IssueId>?fields=status
Response: 200 with the proper/expected status value
Furthermore:
1. Using the same POST REST API, I am able to transition the Issue to a state that is NOT visible in the dropdown! How is this possible?
Questions
1. Why do I get a 400 response when setting a valid status (since I can set the value manually from the dropdown)?
2. Why am I able to transition a Jira to an "invalid" status (since THAT value is not available in the dropdown)?
Thank you.