Hi!!,
How do I change the status of an Issue?
I have this code:URI uri = new URI(JIRA_URL);
JiraRestClient client = new AsynchronousJiraRestClientFactory().createWithBasicHttpAuthentication(uri, USER,PASS);
Issue issue = null;
Promise promise = client.getIssueClient().getIssue("PPDGLB-147");
issue = (Issue) promise.claim();
I have the issue, but there is no the method setStatus.
Thanks
I found the solution. The problem was that I wanted to change the status of a issue. That option isn't possible. You can change the status when you change the transition. You should change the transition in your issue
You can look the id transitions aceppted by your issue in your address jira:
http://YOUR_HOST/jira/rest/api/latest/issue/ISSUE_KEY/transitions?expand=transitions.fields
URI uri = new URI("http://YOUR_HOST/jira/");
JiraRestClient client = new AsynchronousJiraRestClientFactory().createWithBasicHttpAuthentication(uri, USER,PASS);
Promise promise = client.getIssueClient().getIssue("MY_JIRA_KEY");
Issue issue = (Issue) promise.claim();
TransitionInput transitionInput = new TransitionInput("ID_TRANSITION");
this.client.getIssueClient().transition(issue, transitionInput);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.