Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

How to set jira resolution state?

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

2 answers

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.

0 votes
Krister Broman _Advania_
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.
Jan 16, 2020

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?  

{"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"}}}]}

Krister Broman _Advania_
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.
Jan 17, 2020

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. 

Like UJJWAL PHOPATE likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events