summaryrefslogtreecommitdiffstats
path: root/process_bug.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-09-09 08:11:40 +0200
committerlpsolit%gmail.com <>2006-09-09 08:11:40 +0200
commita806b298f5bfe5914f27a1419d27366fe59da449 (patch)
tree25d737aeb60f17360de9a67f2017369a4d5d8349 /process_bug.cgi
parent27c1be36a3cbc57e01c8d51af85be76b0748ece6 (diff)
downloadbugzilla-a806b298f5bfe5914f27a1419d27366fe59da449.tar.gz
bugzilla-a806b298f5bfe5914f27a1419d27366fe59da449.tar.xz
Bug 287326: Ability to add custom single-select fields to a bug - Patch by Frédéric Buclin <LpSolit@gmail.com> and Max Kanat-Alexander <mkanat@bugzilla.org> r=mkanat a=myk
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-xprocess_bug.cgi12
1 files changed, 7 insertions, 5 deletions
diff --git a/process_bug.cgi b/process_bug.cgi
index bc49ce01f..4ca02b17b 100755
--- a/process_bug.cgi
+++ b/process_bug.cgi
@@ -775,14 +775,16 @@ foreach my $field ("rep_platform", "priority", "bug_severity",
}
# Add custom fields data to the query that will update the database.
-foreach my $field (Bugzilla->custom_field_names) {
- if (defined $cgi->param($field)
+foreach my $field (Bugzilla->get_fields({custom => 1, obsolete => 0})) {
+ my $fname = $field->name;
+ if (defined $cgi->param($fname)
&& (!$cgi->param('dontchange')
- || $cgi->param($field) ne $cgi->param('dontchange')))
+ || $cgi->param($fname) ne $cgi->param('dontchange')))
{
DoComma();
- $::query .= "$field = ?";
- my $value = $cgi->param($field);
+ $::query .= "$fname = ?";
+ my $value = $cgi->param($fname);
+ check_field($fname, $value) if ($field->type == FIELD_TYPE_SINGLE_SELECT);
trick_taint($value);
push(@values, $value);
}