Hello,
I am trying to perform status transitions using the edit issue endpoint, since the documentation does state that it supported transitioning statuses. However, when I attempt to perform a status transition, I get a 204 response but the status doesn't actually transition. My request body is
{"fields": {}, "transition": {"id": "21"}}.
Is it possible to transition status using that endpoint? If so, how can I get it to work? I am already aware of the endpoint that specifically handles status transitions, and that one works for me, but I'd like to lump it together with other edits if possible.
Thanks
@Hassan Rachid , Welcome to the Atlassian Community!
You can only edit fields in a transition event via REST API, if this transition has an associated screen. This is because the transition event will edit the fields and status together.
If you intend to transition the issue and edit fields without an associated screen in the transition, this will not work.
Create a new screen > Place the Summary field on it > Associate this screen with the transition you are making > Send the following payload.
{
"transition": {
"id": "XXX"
},
"fields": {
"summary": "Changing summary by REST API transition"
}
}
I hope it helps :)
Regards,
Fernando - Cloud Application Engineer | OAT Solutions
And what if the transition doesn't require additional fields / have a screen associated with it? Do I just omit fields from the request body? I've tried this and have received a 400 response.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If the event does not ask for field changes, just forward the issue. You must use the following parameters.
Metodo: POST
URL: https://your_site_name/rest/api/3/issue/{{issue key}}/transitions
Payload:
{
"transition": {
"id": "XX"
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, that endpoint works for me, but is it possible to do it with this endpoint?
PUT /rest/api/2/issue/{issueIdOrKey}
From the doc - "Edits an issue. A transition may be applied and issue properties updated as part of the edit."
However, when I try, it does not work and I am unsure why
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, I saw it. Honestly I had some difficulty until I understand that the PUT method is only accepting "Edit Issue" not related to status/transition or maybe I didn't understand the payload right
The method I got was sending a POST payload like I showed you before.
Maybe it's a case for you to see with Atlassian if this is really a documentation error or just missing information in the doc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.