From ba4585ae8a1c63a49e40461d2e2efc12bc75c58a Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Mon, 5 Jul 2010 17:42:57 -0700 Subject: Bug 486292: Change the default workflow to UNCONFIRMED, CONFIRMED, IN_PROGRESS, RESOLVED, VERIFIED. r=LpSolit, a=mkanat --- Bugzilla/Install/DB.pm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'Bugzilla/Install/DB.pm') 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], -- cgit v1.2.3-24-g4f1b