summaryrefslogtreecommitdiffstats
path: root/extensions/BMO/Extension.pm
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-03-25 05:46:32 +0100
committerByron Jones <glob@mozilla.com>2015-03-25 05:46:32 +0100
commit4dbea14802e08bce7b62f45055a6fa8fdf3d92e1 (patch)
tree83d519dfcc395f058f9e5f3807ee4e01fb427409 /extensions/BMO/Extension.pm
parent6404e17839514ce811f6716ca18c88c5f39c8886 (diff)
downloadbugzilla-4dbea14802e08bce7b62f45055a6fa8fdf3d92e1.tar.gz
bugzilla-4dbea14802e08bce7b62f45055a6fa8fdf3d92e1.tar.xz
Bug 1147267: the firefox "iteration" and "points" fields are visible on all products
Diffstat (limited to 'extensions/BMO/Extension.pm')
-rw-r--r--extensions/BMO/Extension.pm8
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.