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)
{
Console.WriteLine(issue.Summary);
Console.WriteLine(issue.Resolution);
Console.WriteLine(issue.Status);
issue.Priority = IssuePriority.lowest.ToString();
//issue.Resolution = "10000";
//issue.Resolution = "10003";// ResolutionStatus.done.ToString();
issue.SaveChanges();
}
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?