RSS

(root)/bugzilla/4.2 : 7271 : Bugzilla/Install/DB.pm

To get this branch, use:
bzr branch /bugzilla/4.2

« back to all changes in this revision

Viewing changes to Bugzilla/Install/DB.pm

Max Kanat-Alexander
2010-07-05 17:42:57
Revision ID: mkanat@bugzilla.org-20100706004257-9wg4e8f3s52lbqhi
Bug 486292: Change the default workflow to UNCONFIRMED, CONFIRMED,
IN_PROGRESS, RESOLVED, VERIFIED.
r=LpSolit, a=mkanat

Show diffs side-by-side

added added

removed removed

530
530
    _fix_uppercase_index_names();
531
531
 
532
532
    # 2007-05-17 LpSolit@gmail.com - Bug 344965
533
 
    _initialize_workflow($old_params);
 
533
    _initialize_workflow_for_upgrade($old_params);
534
534
 
535
535
    # 2007-08-08 LpSolit@gmail.com - Bug 332149
536
536
    $dbh->bz_add_column('groups', 'icon_url', {TYPE => 'TINYTEXT'});
2919
2919
    }
2920
2920
}
2921
2921
 
2922
 
sub _initialize_workflow {
 
2922
sub _initialize_workflow_for_upgrade {
2923
2923
    my $old_params = shift;
2924
2924
    my $dbh = Bugzilla->dbh;
2925
2925
 
 
2926
    my $had_is_open = $dbh->bz_column_info('bug_status', 'is_open');
 
2927
 
2926
2928
    $dbh->bz_add_column('bug_status', 'is_open',
2927
2929
                        {TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => 'TRUE'});
2928
2930
 
2955
2957
                  join(', ', @closed_statuses) . ')');
2956
2958
    }
2957
2959
 
 
2960
    # We only populate the workflow here if we're upgrading from a version
 
2961
    # before 3.2.
 
2962
    return if $had_is_open;
 
2963
 
2958
2964
    # Populate the status_workflow table. We do nothing if the table already
2959
2965
    # has entries. If all bug status transitions have been deleted, the
2960
2966
    # workflow will be restored to its default schema.
2974
2980
        # confirmed bugs, so we use this parameter here.
2975
2981
        my $reassign = $old_params->{'commentonreassign'} || 0;
2976
2982
 
2977
 
        # This is the default workflow.
 
2983
        # This is the default workflow for upgrading installations.
2978
2984
        my @workflow = ([undef, 'UNCONFIRMED', $create],
2979
2985
                        [undef, 'NEW', $create],
2980
2986
                        [undef, 'ASSIGNED', $create],

Loggerhead 1.18.1 is a web-based interface for Bazaar branches