Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

I need to change the status of my issue

sanjar_genesis
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 4, 2024
public sealed class Program
{
public static void Main(string[] args)
{
var jira = new JiraClient(Constants.JIRA_URL, Constants.USERNAME, Constants.API_TOKEN);
var issueToUpdate = jira.GetIssues(Constants.PROJECT_KEY).FirstOrDefault(x => x.key == "GEN-12");

var changeStatus = new Transition
{
to = new Status
{
name = "Done",
description = "done"
},
fields = issueToUpdate?.fields
};

jira.TransitionIssue(issueToUpdate, changeStatus);
}
}

 

TechTalk.JiraRestClient.JiraClientException
HResult=0x80131500
Message=Could not transition issue state
Source=TechTalk.JiraRestClient
StackTrace:
at TechTalk.JiraRestClient.JiraClient`1.TransitionIssue(IssueRef issue, Transition transition)
at TechTalk.JiraRestClient.JiraClient.TransitionIssue(IssueRef issue, Transition transition)
at Program.Main(String[] args) in D:\Sanjar\Programming\ConsoleApp1\ConsoleApp1\Program.cs:line 21

This exception was originally thrown at this call stack:
[External Code]

Inner Exception 1:
JiraClientException: JIRA returned wrong status: Bad Request

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events