Removing status in workflow without creating a new copy

David Yu November 12, 2015

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
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 12, 2015

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.

David Yu November 12, 2015

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.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 12, 2015

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 votes
MattS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 12, 2015

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