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.

2 answers

0 vote
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.

Alexey Matveev Community Champion Nov 16, 2017

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.

Alexey Matveev Community Champion Nov 16, 2017

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.

Alexey Matveev Community Champion Nov 16, 2017

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.

Suggest an answer

Log in or Join to answer
Community showcase
Bridget Sauer
Published Mar 05, 2018 in Jira Software

Jack Graves: Real Ale enthusiast with a knack for Jira Software implementation

@Jack Graves first caught our eye with his incredible breakdown of what, in his opinion, can make or break a Jira software implementation. (Read his thoughts on this thread)! In this followup Sh...

65,678 views 4 6
Read article

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot