Hi ,
I am trying to set the resolution state on jira by the url : "/rest/api/2/issue/${issueOrkey}/transitions"
and the json body=
{
"fields": {
"resolution": {
"name": "Duplicate"
}
},
"transition": {
"id": "100"
}
}
It is not working as getting 500 error or sometimes 405 also,
please help with this issue where I am doing wrong either url or parameter
I did not get api related to resolution on jira docs so trying with "transition " url.
Thanks in advance
Hi everyone,
I've get to the result using the following solution:
A Resolution Screen.
(containing only the "Resolution" field)
A Custom Workflow.
(With all the statuses that must transition to resolve an issue containing a transition with the Resolution Screen created above)
The Resolution Screen is inside the transition named: "Resolve Issue"
With that in place, use the following URL:
https://<your_instance_url>/rest/api/2/issue/{issue_key}/transitions?expand=transitions.fields&transitionId={transition_id}
With this payload:
resolution_name = "Duplicate"
transition_id = "41"
{
"update": {},
"transition": {
"id": transition_id # the id must be a string
},
"fields": {
"resolution": {
"name": resolution_name
}
}
}
Considering resolution_name as "Duplicate"
Remember to add your transitions containing screens, that should work out fine.
First of all you are doing a POST command right? Since that API link is the same for both POST and GET which will get you very different results.
When you run the GET command what is your result?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
{"expand":"transitions","transitions":[{"id":"61","name":"Reopen issue","to":{"self":"URL/rest/api/2/status/1","description":"The issue is open and ready for the assignee to start work on it.","iconUrl":"URL/images/icons/statuses/open.png","name":"Open","id":"1","statusCategory":{"self":"https://URL/rest/api/2/statuscategory/2","id":2,"key":"new","colorName":"blue-gray","name":"To Do"}}}]}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And there's your answer, that specific issue have only one transition available and that has ID:61, not 100..
If this is not the transition that you desire then you need to go in to the issue and/or project and set the correct permissions and fill out the correct data.
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.