summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-07-06 05:48:42 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-07-06 05:48:42 +0200
commitacaadbdfefd9cf5c42a69356f7da01ff6c12faac (patch)
tree801afa3d19f2f9c222307ea7f9f66fa5e503a618
parent0de9839ff1e61d51e1f0874d7b03ab7211b54e61 (diff)
downloadbugzilla-acaadbdfefd9cf5c42a69356f7da01ff6c12faac.tar.gz
bugzilla-acaadbdfefd9cf5c42a69356f7da01ff6c12faac.tar.xz
Bug 577053: When upgrading from a version earlier than 4.0,
change the logic on how we check to see if we need to populate the status_workflow table for an upgrading installation, because it was broken for upgrades from 2.18 and earlier.
-rw-r--r--Bugzilla/Install/DB.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm
index ce567528b..ada500c58 100644
--- a/Bugzilla/Install/DB.pm
+++ b/Bugzilla/Install/DB.pm
@@ -2928,8 +2928,6 @@ sub _initialize_workflow_for_upgrade {
my $old_params = shift;
my $dbh = Bugzilla->dbh;
- my $had_is_open = $dbh->bz_column_info('bug_status', 'is_open');
-
$dbh->bz_add_column('bug_status', 'is_open',
{TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => 'TRUE'});
@@ -2963,8 +2961,10 @@ sub _initialize_workflow_for_upgrade {
}
# We only populate the workflow here if we're upgrading from a version
- # before 3.2.
- return if $had_is_open;
+ # before 4.0 (which is where init_workflow was added).
+ my $new_exists = $dbh->selectrow_array(
+ 'SELECT 1 FROM bug_status WHERE value = ?', undef, 'NEW');
+ return if !$new_exists;
# Populate the status_workflow table. We do nothing if the table already
# has entries. If all bug status transitions have been deleted, the