From e3837b96c71158697052cd72f253f910ae7f79dc Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Fri, 13 Jul 2007 21:02:57 +0000 Subject: Bug 388022: Use Bugzilla::Bug to set/update custom fields in process_bug.cgi Patch By Max Kanat-Alexander r=LpSolit, a=LpSolit --- process_bug.cgi | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'process_bug.cgi') diff --git a/process_bug.cgi b/process_bug.cgi index 0faae9e7c..267613f67 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -591,12 +591,7 @@ foreach my $field (Bugzilla->get_fields({custom => 1, obsolete => 0})) { && (!$cgi->param('dontchange') || $cgi->param($fname) ne $cgi->param('dontchange'))) { - DoComma(); - $::query .= "$fname = ?"; - my $value = $cgi->param($fname); - check_field($fname, $value) if ($field->type == FIELD_TYPE_SINGLE_SELECT); - trick_taint($value); - push(@values, $value); + $_->set_custom_field($field, $cgi->param($fname)) foreach @bug_objects; } } @@ -1397,7 +1392,8 @@ foreach my $id (@idlist) { # Bugzilla::Bug does these for us already. next if grep($_ eq $col, qw(keywords op_sys rep_platform priority bug_severity short_desc - status_whiteboard bug_file_loc)); + status_whiteboard bug_file_loc), + Bugzilla->custom_field_names); if ($col eq 'product') { # If some votes have been removed, RemoveVotes() returns -- cgit v1.2.3-24-g4f1b