summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorDylan Hardison <dylan@mozilla.com>2016-06-03 22:51:40 +0200
committerDylan Hardison <dylan@mozilla.com>2016-06-03 22:52:00 +0200
commit13161f4ec66ae6174b553ece906bec31b5b5cff9 (patch)
tree81eefc9e0fe258a4a327c8d546989231116964ff /extensions
parent20bc492eae38c0374ec65568a9c72e9df1318ef1 (diff)
downloadbugzilla-13161f4ec66ae6174b553ece906bec31b5b5cff9.tar.gz
bugzilla-13161f4ec66ae6174b553ece906bec31b5b5cff9.tar.xz
Bug 1277863 - Add crash signature field for "External Software Affecting Firefox" product
Diffstat (limited to 'extensions')
-rw-r--r--extensions/BMO/Extension.pm16
-rw-r--r--extensions/BMO/lib/Data.pm4
-rw-r--r--extensions/BMO/template/en/default/hook/admin/sanitycheck/messages-statuses.html.tmpl15
3 files changed, 32 insertions, 3 deletions
diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm
index 75b8df456..5a9f8c4fa 100644
--- a/extensions/BMO/Extension.pm
+++ b/extensions/BMO/Extension.pm
@@ -965,6 +965,22 @@ sub bug_end_of_create {
}
}
+sub sanitycheck_check {
+ my ($self, $args) = @_;
+
+ my $dbh = Bugzilla->dbh;
+ my $status = $args->{'status'};
+ $status->('bmo_check_cf_visible_in_products');
+
+ my $products = $dbh->selectcol_arrayref('SELECT name FROM products');
+ my %product = map { $_ => 1 } @$products;
+ my @cf_products = map { keys %$_ } values %$cf_visible_in_products;
+ foreach my $cf_product (@cf_products) {
+ $status->('bmo_check_cf_visible_in_products_missing',
+ { cf_product => $cf_product }, 'alert') unless $product{$cf_product};
+ }
+}
+
sub db_sanitize {
print "deleting reporter's user-agents...\n";
Bugzilla->dbh->do("TRUNCATE TABLE bug_user_agent");
diff --git a/extensions/BMO/lib/Data.pm b/extensions/BMO/lib/Data.pm
index 348755d22..d075cd515 100644
--- a/extensions/BMO/lib/Data.pm
+++ b/extensions/BMO/lib/Data.pm
@@ -77,11 +77,10 @@ tie(%$cf_visible_in_products, "Tie::IxHash",
"Android Background Services" => [],
"B2GDroid" => [],
"Calendar" => [],
- "Camino" => [],
"Composer" => [],
"Core" => [],
"Directory" => [],
- "Fennec" => [],
+ "External Software Affecting Firefox" => [],
"Firefox" => [],
"Firefox for Android" => [],
"Firefox for Metro" => [],
@@ -96,7 +95,6 @@ tie(%$cf_visible_in_products, "Tie::IxHash",
"NSS" => [],
"Other Applications" => [],
"Penelope" => [],
- "Plugins" => [],
"Release Engineering" => [],
"Rhino" => [],
"SeaMonkey" => [],
diff --git a/extensions/BMO/template/en/default/hook/admin/sanitycheck/messages-statuses.html.tmpl b/extensions/BMO/template/en/default/hook/admin/sanitycheck/messages-statuses.html.tmpl
new file mode 100644
index 000000000..dddfb1c15
--- /dev/null
+++ b/extensions/BMO/template/en/default/hook/admin/sanitycheck/messages-statuses.html.tmpl
@@ -0,0 +1,15 @@
+[%# This Source Code Form is subject to the terms of the Mozilla Public
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ #
+ # This Source Code Form is "Incompatible With Secondary Licenses", as
+ # defined by the Mozilla Public License, v. 2.0.
+ #%]
+
+[% IF san_tag == "bmo_check_cf_visible_in_products" %]
+ Checking $cf_visibile_in_products for missing product names.
+
+[% ELSIF san_tag == "bmo_check_cf_visible_in_products_missing" %]
+ ... there are custom fields for [% cf_product FILTER html %] but it does not exist!
+
+[% END %] \ No newline at end of file