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
Accepted answer

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.

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
Community showcase
Posted Tuesday in Statuspage

Introducing Statuspage Getting Started guides! First up: What is Statuspage?

Over the next several weeks we'll be sharing some of our Getting Started guides here in the community. Throughout this series of posts, we'd love to hear from customers and non-customers ab...

28 views 2 1
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