Post function to change issue type



I use different workflows on the project. After one workflow is finished, I want the issue pass through other workflow. Right now, I can only manually change issue "Move issue" to change issue type. I want to add post functions to change issue type.

Similar problem:

1 answer

1 vote

This is a very poor design, or at least data and process mapping into JIRA. 

Your workflows should match your process.  You don't have two processes here, you have one, so you should really have one workflow to match it.  Also, generally, issue types are not something that should change as part of the process.  Bugs don't suddenly become Epics just because you've got to a certain point in the process.

On the practical side, yes, you can change the issue type, but it's not going to be pretty.  I would not try to do it as a post-function, as the issue type is structural, and you could potentially be changing the structure from inside it.  Your idea means the issue will have two workflows.  The post-function changing the issue type will be changing from one workflow to another while executing part of the current workflow.  That is going to make a mess - you're effectively removing the current process partway through itself.

This should be done as a listener, which will pick up the last event and change the issue type after the transition is complete.  Otherwise you'll have to deal with transient data changing during the process.

Second problem is that your code is going to have to replicate what "move" does - checking all the data to ensure it is valid in the new configuration for the target issue type.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,116 views 4 9
Read article

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