I'm using the Atlassian C# SDK (which uses REST under the hood). I would like to transition an issue into the "Resolved/Closed" state. This does work on some Jira servers, but on one specific Jira server (v8.20.20) it does not.
The error message is: Field 'resolution' cannot be set. It is not on the appropriate screen, or unknown.
Code:
var resolutions = await jiraClient.Resolutions.GetResolutionsAsync(); // to determine the resolution ID
var testIssue = await jiraClient.Issues.GetIssueAsync("FOO-1234");
testIssue.Resolution = new IssueResolution("some-valid-resolution-id");
var available = await testIssue.GetAvailableActionsAsync(); // to get the transition ID
await testIssue.WorkflowTransitionAsync(some-valid-transition-id);
/*
Makes REST Call (POST) to http:.../rest/api/2/issue/FOO-1234/transitions
{
"transition": {
"id": "some-id"
},
"fields": {
"resolution": {
"name": "Done",
"id": "10000"
}
}
}
*/
Closing the issue on Jira's web interface works fine. What's weird is that the web-tools of the browser tell me that the Resolution field shown in the web form is a (non-mandatory) field named