summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install/DB.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Install/DB.pm')
-rw-r--r--Bugzilla/Install/DB.pm12
1 files changed, 9 insertions, 3 deletions
diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm
index 069096800..47e881e8f 100644
--- a/Bugzilla/Install/DB.pm
+++ b/Bugzilla/Install/DB.pm
@@ -530,7 +530,7 @@ sub update_table_definitions {
_fix_uppercase_index_names();
# 2007-05-17 LpSolit@gmail.com - Bug 344965
- _initialize_workflow($old_params);
+ _initialize_workflow_for_upgrade($old_params);
# 2007-08-08 LpSolit@gmail.com - Bug 332149
$dbh->bz_add_column('groups', 'icon_url', {TYPE => 'TINYTEXT'});
@@ -2919,10 +2919,12 @@ sub _fix_uppercase_index_names {
}
}
-sub _initialize_workflow {
+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'});
@@ -2955,6 +2957,10 @@ sub _initialize_workflow {
join(', ', @closed_statuses) . ')');
}
+ # We only populate the workflow here if we're upgrading from a version
+ # before 3.2.
+ return if $had_is_open;
+
# Populate the status_workflow table. We do nothing if the table already
# has entries. If all bug status transitions have been deleted, the
# workflow will be restored to its default schema.
@@ -2974,7 +2980,7 @@ sub _initialize_workflow {
# confirmed bugs, so we use this parameter here.
my $reassign = $old_params->{'commentonreassign'} || 0;
- # This is the default workflow.
+ # This is the default workflow for upgrading installations.
my @workflow = ([undef, 'UNCONFIRMED', $create],
[undef, 'NEW', $create],
[undef, 'ASSIGNED', $create],