diff options
author | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-05-24 12:58:53 -0700 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-05-24 12:58:53 -0700 |
commit | 7df590fa40af15df14183375f7fb18b7ff2e6969 (patch) | |
tree | 179655ea6059d47b3c8421ccc9093d1d8abbe852 /process_bug.cgi | |
parent | dd80a6716d34b2be54553245b725087ae3ee9acc (diff) | |
download | bugs-7df590fa40af15df14183375f7fb18b7ff2e6969.tar bugs-7df590fa40af15df14183375f7fb18b7ff2e6969.tar.gz bugs-7df590fa40af15df14183375f7fb18b7ff2e6969.tar.bz2 bugs-7df590fa40af15df14183375f7fb18b7ff2e6969.tar.xz bugs-7df590fa40af15df14183375f7fb18b7ff2e6969.zip |
Bug 556901: Move the code for setting status, resolution, and dup_id
from process_bug.cgi into Bugzilla::Bug::set_all
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-x | process_bug.cgi | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/process_bug.cgi b/process_bug.cgi index 3c67f15c9..e71c7ef4d 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -249,7 +249,8 @@ my @set_fields = qw(op_sys rep_platform priority bug_severity work_time set_default_assignee set_default_qa_contact keywords keywordaction cclist_accessible reporter_accessible - product confirm_product_change); + product confirm_product_change + bug_status resolution dup_id); push(@set_fields, 'assigned_to') if !$cgi->param('set_default_assignee'); push(@set_fields, 'qa_contact') if !$cgi->param('set_default_qa_contact'); my %field_translation = ( @@ -261,6 +262,7 @@ my %field_translation = ( set_default_qa_contact => 'reset_qa_contact', keywordaction => 'keywords_action', confirm_product_change => 'product_change_confirmed', + bug_status => 'status', ); my %set_all_fields = ( other_bugs => \@bug_objects ); @@ -454,34 +456,6 @@ if ($move_action eq Bugzilla->params->{'move-button-text'}) { exit; } - -# You cannot mark bugs as duplicates when changing several bugs at once -# (because currently there is no way to check for duplicate loops in that -# situation). -if (!$cgi->param('id') && $cgi->param('dup_id')) { - ThrowUserError('dupe_not_allowed'); -} - -# Set the status, resolution, and dupe_of (if needed). This has to be done -# down here, because the validity of status changes depends on other fields, -# such as Target Milestone. -foreach my $b (@bug_objects) { - if (should_set('bug_status')) { - $b->set_status( - scalar $cgi->param('bug_status'), - {resolution => scalar $cgi->param('resolution'), - dupe_of => scalar $cgi->param('dup_id')} - ); - } - elsif (should_set('resolution')) { - $b->set_resolution(scalar $cgi->param('resolution'), - {dupe_of => scalar $cgi->param('dup_id')}); - } - elsif (should_set('dup_id')) { - $b->set_dup_id(scalar $cgi->param('dup_id')); - } -} - ############################## # Do Actual Database Updates # ############################## |