summaryrefslogtreecommitdiffstats
path: root/Bugzilla/BugMail.pm
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2007-01-10 01:16:54 +0100
committerlpsolit%gmail.com <>2007-01-10 01:16:54 +0100
commited06de9de3117f8894872495e973ff812212ff91 (patch)
treebf984c70d9c46dfcad72f4044d3fac85ff93e02b /Bugzilla/BugMail.pm
parent9366e99627f23f3c397128947433d9c7363d35a5 (diff)
downloadbugzilla-ed06de9de3117f8894872495e973ff812212ff91.tar.gz
bugzilla-ed06de9de3117f8894872495e973ff812212ff91.tar.xz
Bug 365444: Obsolete custom fields are shown in e-mail notifications for new bugs, despite they shouldn't - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=myk
Diffstat (limited to 'Bugzilla/BugMail.pm')
-rw-r--r--Bugzilla/BugMail.pm17
1 files changed, 8 insertions, 9 deletions
diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm
index ca7e20b1e..9b70da03e 100644
--- a/Bugzilla/BugMail.pm
+++ b/Bugzilla/BugMail.pm
@@ -99,15 +99,14 @@ sub Send {
my $msg = "";
my $dbh = Bugzilla->dbh;
-
- my $fields = $dbh->selectall_arrayref('SELECT name, description, mailhead
- FROM fielddefs ORDER BY sortkey');
-
- foreach my $fielddef (@$fields) {
- my ($field, $description, $mailhead) = @$fielddef;
- push(@headerlist, $field);
- $defmailhead{$field} = $mailhead;
- $fielddescription{$field} = $description;
+
+ # XXX - These variables below are useless. We could use field object
+ # methods directly. But we first have to implement a cache in
+ # Bugzilla->get_fields to avoid querying the DB all the time.
+ foreach my $field (Bugzilla->get_fields({obsolete => 0})) {
+ push(@headerlist, $field->name);
+ $defmailhead{$field->name} = $field->in_new_bugmail;
+ $fielddescription{$field->name} = $field->description;
}
my %values = %{$dbh->selectrow_hashref(