Forums

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

Changing status/resolution/comment is not reflecting while i am setting through jira listener

Jabert George
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!
November 4, 2020

I am trying to perform Transitioning an existing issue through custom Jira plugin but during that transition is happening but the changes are not happening in UI. In history, it's updating.


ApplicationUser user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser();

IssueService issueService = ComponentAccessor.getIssueService();
IssueService.IssueResult issueResult = issueService.getIssue(user, issue.getKey());

MutableIssue mutableIssue = issueResult.getIssue();

IssueInputParameters issueInputParameters = issueService.newIssueInputParameters();
issueInputParameters.setStatusId("6");
issueInputParameters.setResolutionId("10300");
issueInputParameters.setComment("changed status and resolution");

IssueService.TransitionValidationResult transitionValidationResult = issueService.validateTransition(user, issue.getId(), 701, issueInputParameters);

if (transitionValidationResult.isValid()) {
IssueService.IssueResult transitionResult = issueService.transition(user, transitionValidationResult);


if (!transitionResult.isValid()) {
// Do something
System.out.println("Invalid : " + transitionResult.getErrorCollection());

} else {
System.out.println("valid");
}

 

0 answers

Suggest an answer

Log in or Sign up to answer