Pete Singleton
Pete Singleton

Reputation: 485

Can't change JIRA issue Status via REST call

I am attempting to resolve an issue in JIRA using the REST API. When I make the call the comment is added, the resolution is set to 'Done' however the issue status doesn't change (it stays as Open not Resolved). The JSON I'm using is:

{  
   "update":{  
      "comment":[  
         {  
            "add":{  
               "body":"Comment added when resolving issue via REST call"
            }
         }
      ]
   },
   "transition":{  
      "id":"51"
   },
   "fields":{  
      "resolution":{  
         "name":"Done"
      }
   }
}

Upvotes: 1

Views: 1726

Answers (1)

Pete Singleton
Pete Singleton

Reputation: 485

I finally resolved this, I had to add "transitions?expand=transitions.fields" to the end of the URL to get it to transition. So full URL was:

https://{jirahost}/jira/rest/api/2/issue/{issuekey}/transitions?expand=transitions.fields

Upvotes: 1

Related Questions