IssueInputParameters won't change issue type

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?

1 answer

1 accepted

This widget could not be displayed.
Steven Behnke Community Champion Oct 18, 2017

Can you edit the issuetype on existing issues within your Prod system?  If you have different fieldconfigs or workflows, it may not let you just 'change' the issuetype.

You are probably right, each issue type on prod has its own workflow (95% identical though)  whereas they share a workflow on my local instance. I can edit issue types on prod but I have to use the move functionality. 

The only times that we want to change issue types is just after the issue has been created, before any work is done so I was hoping that Jira would be able to figure out the transition.

Can you confirm that as long as each issue type has a different workflow editing issue type via issueInputParameters is not possible?

Steven Behnke Community Champion Oct 19, 2017

No, I can't confirm that. It's simply how I understand the behavior, I'm not sure where it's enforced or not.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

128 views 2 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you