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 Leaders.
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

0 votes
Nicketa 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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 20, 2024

HI @serge calderara 

 

What is the API response when it does not work?

 

Regards

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
9.12.14
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events