The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.