Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,359,776
Community Members
 
Community Events
168
Community Groups

Cannot transition an issue via Rest API

Hello, I'm trying to change the status of the Jira issue using postman, and I'm using the following URL: https://atlassian.net/rest/api/2/issue/{id o rissuekey}/transitions

 

Bu I'm getting the error:

{
    "errorMessages": [
        "Transition id '10194' is not valid for this issue."
    ],
    "errors": {}
}

I don't why I'm unable to perform the transition, also the 10194 is the Id for the status that I want to change, also i'm using the security token for the authorization, I map the Id using the: /rest/api/2/status and also the xml file 

update status.png

 

1 answer

1 accepted

4 votes
Answer accepted

@Gerson Baires -

Welcome to the community.  You will have to review the WF setup in your project, to ensure that your current issue status do have an actual transition setup to the next status - where the transition object is your referenced ID.

Hope this helps.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Infrastructure Applications Team

Viasat Inc.

Hi @Joseph Chung Yin thank you for the fast reply,  I was able to map the IDs, but where I can find those IDs in the Workflow? because I got confused with the status IDs since the: /rest/api/2/issue/{id o rissuekey}/transitions,  display different ones, for example, 10282 and the ones that worked are 10, 13. 

Map id jira question.png

@Gerson Baires -

You will need to go to your project and access Project settings >> Workflows.  In the WF UI, identify the WF in question and click on Edit (pencil symbol) to check the WF -

2022-08-15_21-26-18.png

Once in the WF configuration UI - you can toggle between the Diagram or Text mode to view the WF details.  In the Text mode, you will find all the transitions + their associate transition ID.  Those are the ID that you need to use.  NOTE - Each transition associated with a WF of a project, their ID can be different for the other projects.

2022-08-15_21-27-29.png

In the Diagram mode, you will be able to see all the transitions from status to status in a visual mode.

2022-08-15_21-28-02.png

 

Hope this helps.

Best, Joseph

Like Gerson Baires likes this

@Joseph Chung Yin   You're awesome!! thank you for the detailed explanation, I really appreciated , I will proceed as you explain, Thank you again.  😀

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

An unofficial way to monitor a JSM mail handler for errors

...eturns true if any content is returned for the webResponse.body.data.first s...

650 views 3 19
Read article

Atlassian Community Events