Commit 987e438b 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 0584d204
...@@ -417,10 +417,10 @@ use constant is_default => 0; ...@@ -417,10 +417,10 @@ use constant is_default => 0;
sub is_set_on_bug { sub is_set_on_bug {
my ($self, $bug) = @_; my ($self, $bug) = @_;
# We treat it like a hash always, so that we don't have to check if it's my $value = blessed($bug) ? $bug->component_id : $bug->{component};
# a hash or an object. $value = $value->id if blessed($value);
return 0 if !defined $bug->{component_id}; return 0 unless $value;
$bug->{component_id} == $self->id ? 1 : 0; 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