Commit fc5aae40 authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 895813: Mandatory custom fields whose visibility depends on a component are…

Bug 895813: Mandatory custom fields whose visibility depends on a component are not required on bug creation r=pketolai r=dkl a=sgreen
parent 3af2a748
......@@ -413,10 +413,10 @@ use constant is_default => 0;
sub is_set_on_bug {
my ($self, $bug) = @_;
# We treat it like a hash always, so that we don't have to check if it's
# a hash or an object.
return 0 if !defined $bug->{component_id};
$bug->{component_id} == $self->id ? 1 : 0;
my $value = blessed($bug) ? $bug->component_id : $bug->{component};
$value = $value->id if blessed($value);
return 0 unless $value;
return $value == $self->id ? 1 : 0;
}
###############################
......
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