summaryrefslogtreecommitdiffstats
path: root/process_bug.cgi
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-05-17 00:20:02 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-05-17 00:20:02 +0200
commit566655693317f329ec9d412a5c7bc058276858ba (patch)
tree20e619adeec7ac76a14a1dd438ed0b0cc814cf65 /process_bug.cgi
parentb58573f7f748b46bd05106aef4e9b4ff3a985025 (diff)
downloadbugzilla-566655693317f329ec9d412a5c7bc058276858ba.tar.gz
bugzilla-566655693317f329ec9d412a5c7bc058276858ba.tar.xz
Bug 556154: process_bug.cgi: move the stuff in the loop after $b->set_all
into Bugzilla::Bug::set_all r=dkl, a=mkanat
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-xprocess_bug.cgi35
1 files changed, 16 insertions, 19 deletions
diff --git a/process_bug.cgi b/process_bug.cgi
index 956068370..ef8f41070 100755
--- a/process_bug.cgi
+++ b/process_bug.cgi
@@ -323,7 +323,7 @@ my @set_fields = qw(op_sys rep_platform priority bug_severity
component target_milestone version
bug_file_loc status_whiteboard short_desc
deadline remaining_time estimated_time
- work_time);
+ work_time set_default_assignee set_default_qa_contact);
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 = (
@@ -331,6 +331,8 @@ my %field_translation = (
rep_platform => 'platform',
short_desc => 'summary',
bug_file_loc => 'url',
+ set_default_assignee => 'reset_assigned_to',
+ set_default_qa_contact => 'reset_qa_contact',
);
my %set_all_fields;
@@ -347,29 +349,24 @@ if (should_set('comment')) {
is_private => scalar $cgi->param('commentprivacy'),
};
}
+if (should_set('see_also')) {
+ $set_all_fields{'see_also'}->{add} =
+ [split(/[\s,]+/, $cgi->param('see_also'))];
+}
+if (should_set('remove_see_also')) {
+ $set_all_fields{'see_also'}->{remove} = [$cgi->param('remove_see_also')];
+}
my @custom_fields = Bugzilla->active_custom_fields;
+foreach my $field (@custom_fields) {
+ my $fname = $field->name;
+ if (should_set($fname, 1)) {
+ $set_all_fields{$fname} = [$cgi->param($fname)];
+ }
+}
foreach my $b (@bug_objects) {
$b->set_all(\%set_all_fields);
- $b->reset_assigned_to if $cgi->param('set_default_assignee');
- $b->reset_qa_contact if $cgi->param('set_default_qa_contact');
-
- if (should_set('see_also')) {
- my @see_also = split(',', $cgi->param('see_also'));
- $b->add_see_also($_) foreach @see_also;
- }
- if (should_set('remove_see_also')) {
- $b->remove_see_also($_) foreach $cgi->param('remove_see_also')
- }
-
- # And set custom fields.
- foreach my $field (@custom_fields) {
- my $fname = $field->name;
- if (should_set($fname, 1)) {
- $b->set_custom_field($field, [$cgi->param($fname)]);
- }
- }
}
# Certain changes can only happen on individual bugs, never on mass-changes.