Post function to change issue type

Hi,

 

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:

https://community.atlassian.com/t5/JIRA-questions/Can-I-migrate-issues-between-workflows-under-a-single-project/qaq-p/155461

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

78 views 0 5
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