Atlassian .Net SDK modifying status and resolution

I have a very simply console app which I'm using to wrap my head around the JIRA .Net SDK. Most of it is quite straight forward to use but my main thing is being able to change the status and priority of issues programmatically. 

I have the following code inside my main method:

 var issues = from i in jira.Issues.Queryable
where i.Summary == "Issue 2" && i.Assignee == "admin"
orderby i.Created
select i;

foreach (var issue in issues)

issue.Priority = IssuePriority.lowest.ToString();
//issue.Resolution = "10000";
//issue.Resolution = "10003";// ResolutionStatus.done.ToString();


 This code happily brings back my issue and I can change the summary, priority and all the other bits via code just fine. However, when I try and use the Resolution and Status options, I get errors. 

I created 2 enums that hold the expect values inside them:

 public enum IssuePriority
highest = 1,
high = 2,
medium = 3,
low = 4,
lowest = 5

public enum ResolutionStatus
done = 10000,
wontDo = 10001,
duplicate = 10002,
cannotReproduce = 1003

But when I try and change the resolution, I get the following error:

"Response Content: {\"errorMessages\":[],\"errors\":{\"resolution\":\"Field 'resolution' cannot be set.
It is not on the appropriate screen, or unknown.\ 

Looking at the description of resolution is has a getter and setter, but still the issue persists. Have anyone combatted this error before? 

1 answer

0 votes
Warren Levy Community Champion Jul 18, 2017

Hi Sean

Using the code I suggested in your earlier question, I transition an issue to the Resolved status with






The first parameter passes the issue id in as {JiraKey}

The third parameter is a Json packet, where transition specifies what status to change to (depending on your workflow) and resolution is the resolutionstatus that you were trying to set

The fourth parameter is now not GET but POST


Then I close it with






Let me know if you have any further questions about this

There's a couple of underlying principles in this that Warren handles perfectly and automatically but doesn't explicitly mention

1.  REST respects your setup.  You need the Resolution to be on the screen so you can set it.  An additional wrinkle to that is that any competent JIRA admin will *never* put the Resolution on anything other than a "transtion" or "view" screen.

2.  You cannot "set" status (it only works when importing issues, not "edit" or "update").  You must transition from one status to another.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,376 views 15 19
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