Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

REST API - How to update status of ticket when there is no specific transition

jeremy.bonde
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 8, 2022

I am trying to update tickets using rest api but I am not able to change the status from "TO BE INTEGRATED" to "A TESTER". Here is my project workflow :

2022-04-08 15_31_31-Software Simplified Workflow for Project AV - Jira.pngAs you can see, there is no explicit transition linking from TO BE INTEGRATED to A TESTER. All is allowed. 
When I list all transitions for a ticket in the project. The api returns me a json with all transitions, one by status, example for one of them :

{
"id":"51",
"name":"A tester",
"to":[
"Object"
],
"hasScreen":false,
"isGlobal":true,
"isInitial":false,
"isAvailable":true,
"isConditional":false,
"isLooped":false
}
 The content of "to" property is this one :
{
self: 'atlassian_domain/rest/api/3/status/10030',
description: 'This status is managed internally by Jira Software',
iconUrl: 'atlassian_domain',
name: 'A tester',
id: '10028',
statusCategory: {
self: 'atlassian_domain/rest/api/3/statuscategory/4',
id: 4,
key: 'indeterminate',
colorName: 'yellow',
name: 'En cours'
}
}

 I supposed that the "to" is the target status. So my http body looks like this :

{
"update": {
"fixVersions":[
{
"set":[{"name":"JohnDoe_Version"}]
}
]
},
"transition":{"id":"51"}
}

 And the version changes but the status do not... I changed manually my tickets to different status' and I also tried to change the transition id without any success...

There is no error from http request and my version changes correctly so I don't know if the problem comes from the fact that there is no explicit transition between "To be integrated" and "A tester" or if I am doing something wrong.

Thanks

1 answer

0 votes
Martin Bayer _MoroSystems_ s_r_o__
Community Champion
April 8, 2022

Hi @jeremy.bonde I just played with it a little. I found out that if you do not need to update any field, you can use REST endpoint https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-transitions-post

And in case you are using for example Postman, you need to specify "https://" on the beginning of the URL.

Following setup works for me:

Screen Shot 2022-04-08 at 22.48.56.png

Suggest an answer

Log in or Sign up to answer