I am using 'https://domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}' to edit an issue. I want to use the same API to change the status as well. While following works in edit with PUT method,
{ "fields": { "assignee":{"name":"assigneeKey"}, "priority":{"name":"Highest"}, "issuetype" : {"name" : "Bug"}, "summary": "Summary" }, "update": { "description": [{ "set": "Hello description" }] } }
'transition' key doesn't work for me. I used it like this
"transition": { "id": "1"}
directly inside the root JSONObject. Server returned with 204 status code but no change was done in Issue.
Is transition 1 representing a transition that exists in the workflow? Is the issue in the right status? (i.e. the transition is the one that takes it out of that status/step to the desired one?). Does the workflow have any validators or conditions on it that might be blocking the transtion? (Although I'd expect an error there, rather than a simple 204)
Edit: sorry, that was far too short! I've tried to improve it.
I tried values from 1 to 20 randomly.. None works. I mean I get a 204 No Content response but status doesn't change. To answer your question, 1 is valid.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Random numbers really aren't going to do anything! Could you look at the text view of the workflow? Especially for the step the issue is currently in?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just a tidbit to add to Nic's great answer, you can use the API to get all transitions and ID's valid for your current state for a specific issue – http://jira.example.com/rest/api/2/issue/TST-123/transitions
The documentation for this REST endpoint is avaliable here – https://docs.atlassian.com/jira/REST/latest/#api/2/issue-getTransitions
Otherwise Nic is right, the correct id value is in the Workflow Editor.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.