summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-10-23 03:32:59 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-10-23 03:32:59 +0200
commit42692f500a89b0a90b06ec8fbe2853dfc601c8ef (patch)
treeef5a7c30ad11e2152cae1ad02f513af261f052b6
parentaa3122956b8e1d75cbe016ac46d472c60c88e1ee (diff)
downloadbugzilla-42692f500a89b0a90b06ec8fbe2853dfc601c8ef.tar.gz
bugzilla-42692f500a89b0a90b06ec8fbe2853dfc601c8ef.tar.xz
A better fix for Bug 577053: We only upgrade an old workflow to a new
one if we're upgrading from a version of Bugzilla before 4.0, and we figure this out now by checking the existence of bugs_activity.comment_id. r=LpSolit, a=mkanat
-rw-r--r--Bugzilla/Install/DB.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm
index f8a9c15d3..4dcf0d637 100644
--- a/Bugzilla/Install/DB.pm
+++ b/Bugzilla/Install/DB.pm
@@ -2953,10 +2953,9 @@ sub _initialize_workflow_for_upgrade {
}
# We only populate the workflow here if we're upgrading from a version
- # 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;
+ # before 4.0 (which is where init_workflow was added). This was the
+ # first schema change done for 4.0, so we check this.
+ return if $dbh->bz_column_info('bugs_activity', 'comment_id');
# Populate the status_workflow table. We do nothing if the table already
# has entries. If all bug status transitions have been deleted, the