Hi,
I'm using Atlassian.Jira.dll and have already connected successfully.
I can fetch an issue without problems and have also managed to leave a comment on it via API. Now I need to update and set the issue status to "xyz". How can I do that?
I've already tried issue.SetPropertyAsync(), jira.Issues.UpdateIssueAsync(), among other things. ChatGPT also wasn't of any help either.
I think UpdateIssueAsync() is the right way to go, but I can't figure out how to set the issue status. issue.Status is read only.
Can anybody help? Here's the code snippet:
// Jira Client
Atlassian.Jira.Jira jira = GetJiraClient();
if (jira == null)
return;
// Get relevant issues
string jql_query = $"project = \"12345\"";
IPagedQueryResult<Issue> jira_issues = jira.Issues.GetIssuesFromJqlAsync(jql_query).Result;
if (jira_issues == null || !jira_issues.Any())
return;
string new_status = "New Status";
foreach (Issue issue in jira_issues)
{
// Change issue values here
// Update issue status here
jira.Issues.UpdateIssueAsync(issue);
}