How to Update the transition in JIRA?

I am automating our release process by integrating our build software to update the transition in  JIRA system.

I am using C# widows application with JIRA SDK. I am able to update every other fields but transition.

So I tried updating transition with Postman by posting below code through APIs:

"update": {
"comment": [
"add": {
"body": "This is included in XX.06 Version."
"transition": {
"id": "211"



But no luck.


I am using windows app with C#.

Could anyone help me out. 

Thanks in advance.

3 answers

0 votes
Warren Levy Community Champion Nov 16, 2017

Hi Kamal

When I transition an issue, the JSON looks like this

"update": {},
"transition": {
"id": "241"
"fields": {
"resolution": {
"name": "Done"

So it's the resolution section which is different - try adding that

Thanks for your reply Warren.

I added the code what you suggested and tried posting using 'Postman'. With 'no authentication' as well as 'Basic Authentication',

In both the case i am getting 'Unauthorized 401' error.

Could you please guide me step by step or any link where i can get these details.

Thanks in advance.

You need to provide authenications data in the header. You should add to the header Authorization parameter with value "Basic <encodedBase64String>"

encodedBase64String= Base64.encode("username:password").

Read more here about it

Hi Alexey,

Thanks for your response.

I tried the way you have suggested but still i am getting same  'Unauthorized 401' error.

Here is code snippet i am trying to run from my app using C#.

var client = new RestClient("");
var request = new RestRequest(Method.POST);
request.AddHeader("postman-token", "864f9baf-c18b-7eeb-6329-b36e8c5cf726");
request.AddHeader("cache-control", "no-cache");
request.AddHeader("Authorization", "Basic dGVzdDp0ZXN0");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "\r\n{\r\n \"update\": {},\r\n \"transition\": {\r\n \"id\": \"211\"\r\n },\r\n \"fields\": {\r\n \"resolution\": {\r\n \"name\": \"Done\"\r\n }\r\n }\r\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);


I am getting following response  in body section:

<body id="jira" class="aui-layout aui-style-default page-type-message" data-version="7.1.1" >
<div class="aui-page-panel">
<div class="aui-page-panel-inner">
<section class="aui-page-panel-content">
<header class="aui-page-header">
<div class="aui-page-header-inner">
<div class="aui-page-header-main">
<h1>Unauthorized (401)</h1>
<!-- .aui-page-header-main -->

<!-- .aui-page-header-inner -->
<!-- .aui-page-header -->
<div class="aui-message aui-message-warning warning">
<p>Encountered a
<code>&quot;401 - Unauthorized&quot;</code> error while loading this page.
<a href="/secure/MyJiraHome.jspa">Go to JIRA home</a>
<!-- .aui-page-panel-content -->

<!-- .aui-page-panel-inner -->
<!-- .aui-page-panel -->


Any idea why its happening?

I am able to change the transition manually in JIRA site. So there is no question of authorization. Something else i am missing in this.

I forgot to ask. Do you use basic authentication in Jira? Sorry, I had to begin with the question.

No problem. Yes  i do have basic authentication in JIRA.

Could you execute a simpler script

var client = new RestClient("");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Basic dGVzdDp0ZXN0");
request.AddHeader("content-type", "application/json");
IRestResponse response = client.Execute(request);

Your response must return information about projects 

Thanks Alexey for your response.

I still got same error. 

The transition may be commited under the conditions:

1. You have transition from the current status to the planned.

2. You have to fill all required fields on transition screen.

3. All validators have been passed.

So check that you a really have transition "id": "211" from the current status, all required fields have been filled and all validators have been passed.

Hi Gregor,

Thanks for your response.

I tried updating all the fields and also my transition id is correct. And validators are passed.

Still i got the same error.

Sorry to ask a dumb question, but does the user you're authenticating as have project_admin scope? It appears from the doco you have to have that to make transition changes to an issue, but you can create the issue with just the create scope just not transition it.

I will comment that I'm fighting with a similar problem at the moment, so I could well be wrong.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Organizing your space just got easier - Page Tree Drag & Drop is here

Hi Community! I’m Elaine, Confluence Product Manager. You may have read my earlier post about page tree in space navigation sidebar. I'm excited to share another improvement that helps you organize ...

103 views 3 4
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you