summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-06-04 06:58:13 +0200
committerByron Jones <glob@mozilla.com>2015-06-04 06:58:13 +0200
commitee871d60807c143cd93fbd83b8fd1afa8ed4eb0e (patch)
tree77c7172f32cf8d053471a797eaf002b80cdf1786 /extensions
parentee8fcdaa1d5da3b4c56218c462fa588d13773f07 (diff)
downloadbugzilla-ee871d60807c143cd93fbd83b8fd1afa8ed4eb0e.tar.gz
bugzilla-ee871d60807c143cd93fbd83b8fd1afa8ed4eb0e.tar.xz
Bug 1170179: Do not automatically set 'firefox-affected' release-tracking flags for comm-central products.
Diffstat (limited to 'extensions')
-rw-r--r--extensions/TrackingFlags/template/en/default/hook/bug/create/create-form.html.tmpl39
1 files changed, 35 insertions, 4 deletions
diff --git a/extensions/TrackingFlags/template/en/default/hook/bug/create/create-form.html.tmpl b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-form.html.tmpl
index c027c6b7f..53f80a885 100644
--- a/extensions/TrackingFlags/template/en/default/hook/bug/create/create-form.html.tmpl
+++ b/extensions/TrackingFlags/template/en/default/hook/bug/create/create-form.html.tmpl
@@ -6,7 +6,27 @@
# defined by the Mozilla Public License, v. 2.0.
#%]
-[% RETURN UNLESS tracking_flag_components %]
+[%
+ RETURN UNLESS tracking_flag_components;
+
+ # A list of products that will automatically set cf_status_firefox to
+ # "affected" when filing bugs with nightly. An empty component list
+ # denotes all components.
+ auto_affected = {
+ "Firefox" = [],
+ "Firefox for Android" = [],
+ "Firefox OS" = [],
+ "Core" = [],
+ "Toolkit" = [],
+ "Firefox Health Report" = [ "Client: Desktop", "Client: Android" ],
+ };
+
+ # map product names to lowercase
+ FOREACH key IN auto_affected.keys;
+ key_lc = key.lower;
+ auto_affected.$key_lc = auto_affected.item(key);
+ END;
+%]
<script type="text/javascript">
$(function() {
@@ -26,16 +46,27 @@
});
}).click();
- [% IF highest_status_firefox %]
- $('#version, #bug_status')
+ [% IF highest_status_firefox && auto_affected.exists(product.name.lower) %]
+ $('#version, #bug_status, #component')
.change(function() {
var version = $('#version').val();
+ var component = $('#component').val() || '';
if ($('#bug_status').val() != 'UNCONFIRMED'
&& (
version.toLowerCase() == 'trunk'
|| version == highest_status_firefox + ' Branch'
|| version == 'Firefox ' + highest_status_firefox
- ))
+ )
+ [% auto_components = auto_affected.item(product.name.lower) %]
+ [% IF auto_components.size %]
+ && (
+ [% FOREACH auto_component IN auto_components %]
+ [% " || " UNLESS loop.first %]
+ component.toLowerCase() === '[% auto_component.lower FILTER js %]'
+ [% END %]
+ )
+ [% END %]
+ )
{
$('#cf_status_firefox' + highest_status_firefox).val('affected');
}