summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install/DB.pm
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-07-06 02:42:57 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-07-06 02:42:57 +0200
commitba4585ae8a1c63a49e40461d2e2efc12bc75c58a (patch)
tree8dc9797b39e698089785eef1e6a2ca55e094934b /Bugzilla/Install/DB.pm
parent4e7c28de087834ba8fca4350a01798c1f9732f23 (diff)
downloadbugzilla-ba4585ae8a1c63a49e40461d2e2efc12bc75c58a.tar.gz
bugzilla-ba4585ae8a1c63a49e40461d2e2efc12bc75c58a.tar.xz
Bug 486292: Change the default workflow to UNCONFIRMED, CONFIRMED,
IN_PROGRESS, RESOLVED, VERIFIED. r=LpSolit, a=mkanat
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],