diff options
Diffstat (limited to 'extensions/BMO')
-rw-r--r-- | extensions/BMO/Extension.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm index 03adcac33..52bdd53bc 100644 --- a/extensions/BMO/Extension.pm +++ b/extensions/BMO/Extension.pm @@ -343,7 +343,13 @@ sub active_custom_fields { } sub cf_hidden_in_product { - my ($field_name, $product_name, $component_name) = @_; + my ($field_name, $product_name, $component_name, $bug) = @_; + + # check bugzilla's built-in visibility controls first + if ($bug) { + my $field = Bugzilla::Field->new({ name => $field_name, cache => 1 }); + return 1 if $field && !$field->is_visible_on_bug($bug); + } # If used in buglist.cgi, we pass in one_product which is a Bugzilla::Product # elsewhere, we just pass the name of the product. |