Commit b8fcea9b authored by Alex Schuilenburg's avatar Alex Schuilenburg Committed by Dave Lawrence

Bug 525195 - Invisible fields still show up in the "New:" bugmail (fields whose…

Bug 525195 - Invisible fields still show up in the "New:" bugmail (fields whose visibility depends on another field) r=dkl,a=LpSolit
parent 58020222
......@@ -443,11 +443,18 @@ sub _get_new_bugmail_fields {
my $bug = shift;
my @fields = @{ Bugzilla->fields({obsolete => 0, in_new_bugmail => 1}) };
my @diffs;
my $params = Bugzilla->params;
foreach my $field (@fields) {
my $name = $field->name;
my $value = $bug->$name;
next if !$field->is_visible_on_bug($bug)
|| ($name eq 'classification' && !$params->{'useclassification'})
|| ($name eq 'status_whiteboard' && !$params->{'usestatuswhiteboard'})
|| ($name eq 'qa_contact' && !$params->{'useqacontact'})
|| ($name eq 'target_milestone' && !$params->{'usetargetmilestone'});
if (ref $value eq 'ARRAY') {
$value = join(', ', @$value);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment