The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Is there a way to chage status through a transition screen using API

serge calderara
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
November 20, 2024

Deal all,

IN our Jira project we have workflow transition which contains Screen for populating some field before transitioning.

When calling this screen transition from Jira API, even by providing corresponding field supposed to be filled from the screen, the transition did not occurs.

Did you face the same behavior ? 

Note :
I know a workaround would be to create an identical transition without the screen BUT that is not the goal.

Thanks for your return

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Nicketa
Contributor
November 28, 2024

Hello @serge calderara ,

 

Yes, you have to keep only those options in the payload which are available in the transition. Otherwise it will not work.

Additionally you'll have to provide transition id to proceed. Suppose, there are 2 transitions available, you have to specify the transition id.

First try GET: 

https://docs.atlassian.com/software/jira/docs/api/REST/9.5.0/#api/2/issue-getTransitions

Then try POST:

https://docs.atlassian.com/software/jira/docs/api/REST/9.5.0/#api/2/issue-doTransition

Below is the sample payload

{

    "update": {

        "comment": [

            {

                "add": {

                    "body": "Comment on transition via Postman. Any field update only works, when transition screen is present with fields. - In Progress"

                }

            }

        ]

    },

    "transition": {

        "id": "11"

    }

}

 

BR,

Nicketa

0 votes
Florian Bonniec
Community Champion
November 20, 2024

HI @serge calderara 

 

What is the API response when it does not work?

 

Regards

DEPLOYMENT TYPE
SERVER
VERSION
9.12.14
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events