Hello guys!
I'm facing a problem when trying to update resolution using IssueInputParameters object.
My code runs normally without errors, but the resolution field isn't stored.
A curious fact is that whether I use IssueManager.updateIssue method the update occurs perfectly.
Someone has any idea of why IssueInputParameters doesn't work correctly?
IssueInputParameters issueInputParameters = ComponentAccessor.getIssueService().newIssueInputParameters();
issueInputParameters.setSkipScreenCheck(true);
issueInputParameters.setResolutionId("10100");
IssueService issueService = ComponentAccessor.getIssueService();
UpdateValidationResult updateValidationResult = issueService.validateUpdate(getApplicationUserAdmin(), issue.getId(), issueInputParameters);
if (updateValidationResult.isValid()) {
IssueResult issueResult = issueService.update(getApplicationUserAdmin(), updateValidationResult, EventDispatchOption.DO_NOT_DISPATCH, false);
if (!issueResult.isValid()) {
log.error("Error updating Issue [" + issue.getKey() + "]\n" + issueResult.getErrorCollection());
}
else {
reindexIssue(issue);
}
}
else {
log.error("Error of validation (update Issue [" + issue.getKey() + "])\n" + updateValidationResult.getErrorCollection());
}