I am trying to change issue type using IssueInputParameters and my code looks roughly like this:
log.debug(oldIssue.getIssueTypeId()); //outputs "5"
IssueInputParameters issueInputParameters = this.issueService.newIssueInputParameters();
issueImputParameters.setIssueTypeId("6");
log.debug(issueInputParameters.getIssueTypeId()); //outputs "6"
IssueService.UpdateValidationResult updateValidationResult = issueService.validateUpdate(authcontext.getUser(), oldIssue.getId(), issueInputParameters);
if (updateValidationResult.isValid()) {
IssueService.IssueResult result = issueService.update(authcontext.getUser(), updateValidationResult);
alteredIssue = result.getIssue();
}
log.debug(alteredIssue.getIssueTypeId()); //outputs "5"
This works fine on my local machine, but when I deploy it to our test server running a more complicated Jira system (more custom workflows etc) it doesn't change issue type. Other values such as summary or custom field values get edited just fine.
I've tried different combinations of old issue type, new issue type but it never seems to change. Does anyone have a clue what might be causing this?