I am attempting to close Jira issues via REST API, however, I am getting a 500 error when attempting to POST to the transitions API endpoint.
I am submitting the following as JSON:
closeIssue = {
"transition":{
"id": "6"
}
}
Each submission results in the following error:
{"errorMessages":["Internal server error"],"errors":{}}
When I attempt to GET the transitions endpoint, I get the following response:
{"expand":"transitions","transitions":[]}
I think I should be seeing possible transitions with the GET action, but I don't see anything.
Thank you all. We found that the issue was permissions related. The user I was using for REST work did not have permissions to perform transitions.
We altered this and gave the user transitions and I can see the available transitions in the GET call now.
With GET /rest/api/2/issue/{{issueId}}/transition, we can identify the transition ID to resolve the issue.
Then I issue POST /rest/api/2/issue/{{issueId}}/transitions with following JSON to resolve the issue:
{
"transition": {
"id": "761"
}
}
I got the internal server error if the transition ID isn't a valid transition for the issue.
Example: I was closing issue# ABC-1 with transition ID 761 but got the error doing the same for issue# ABC-2 as it was with different issue type that associated with different workflow.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately, nothing comes back with a GET request. I get a blank response:
{"expand":"transitions","transitions":[]}
Any idea what could be causing this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Something on your workflow must hide the transition so the API is returning an empty array
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Workflow condition and user permission can result in empty transition.
For example, if you have the workflow condition that only allow Assignee to transition issue, then user other than the Assignee will not be able to see any transition option.
If this is a Jira Service Management issue and user (not the issue Reporter) has no JSM application access, the transition option will not be available for this user.
The easiest approach to clarify this is to login to Jira application as the user associated to the REST call and confirm if the user can see the transition option.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you check if you don't have a condition in your workflow that hide the transition
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
Register NowOnline 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.