Removing status in workflow without creating a new copy

Since JIRA doesn't support "subtractive" draft editing of workflows, I've been trying to find ways around this.

The reason I'm trying this is because I have hundreds of projects mapped to a workflow scheme. If I did this the "right way," JIRA would iterate through all the issues in the hundreds of projects, and perform workflow verification/migration on the tickets. With million, this becomes very slow.

Another method I've been experimenting with:

  1. Make a copy of the workflow
  2. Remove a status I no longer want
  3. Export as XML
  4. Do a search to filter for any lingering issues still on the status I removed, and bulk transition it out.
  5. Update this XML directly the the table jiraworkflows to overwrite the existing one.
  6. Restart JIRA

This method cosmetically seems to work. Anyone ever hit this same situation?

 

2 answers

1 accepted

3 votes

JIRA does allow the draft editing of workflows, it's just that some things can't be done in draft because data needs to be migrated if you do it.

There's a good reason it is there - to stop you messing up your data.  It's actually doing something similar to what your experimental method is doing - when you apply the new workflow, it's effectively doing bulk changes to the affected issues.

You're right about the volume - the checks and changes JIRA does is bigger than a bulk transition.  But if you miss one issue, you've got a broken JIRA

On step 5 - this is risky, although it will work in theory.  You've got the best method, because step 2 will ensure you've got a valid workflow.  But I'd worry that any other edits you make might break it - if one step id is wrong, you've got a broken set of JIRA issues.

In short, I can't recommend your method of change, but if you keep it absolutely minimal and you're really careful, it should be ok. 

I'd add two steps

5.5 - export the imported workflow again and compare it with the original export to make 100% sure that only the status you want to kill has been removed (as well as its transitions).  Most importantly, no ids have been changed

7 - run the integrity checker to validate the workflows against issues.  It should spot no problems if it's worked.

5.5 : Yes, I'd make a copy of the original workflow so everything is original. Then remove the status I don't want, and JIRA should also take off the transitions automatically. Thanks for the review.

Sorry, I wasn't too clear - I know you've got the copy of the original, but I mean compare it with what you have imported, just in case the export/import has not preserved all the ids.

0 vote

Yeah I've done this once. It worked but I have avoided it since. Nic is right, easy to corrupt JIRA. 

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 Stride

Get Started in Stride in 3 Easy Steps

Get started on Stride in 3 easy steps   If you’re new to Stride, welcome! We’re super excited to have you aboard. Stride is easy to use and set up, so don’t worry about reading tons of borin...

54 views 0 2
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