Skip to content

Commit ee871d6

Browse files
committed
Bug 1170179: Do not automatically set 'firefox-affected' release-tracking flags for comm-central products.
1 parent ee8fcda commit ee871d6

1 file changed

Lines changed: 35 additions & 4 deletions

File tree

extensions/TrackingFlags/template/en/default/hook/bug/create/create-form.html.tmpl

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,27 @@
66
# defined by the Mozilla Public License, v. 2.0.
77
#%]
88

9-
[% RETURN UNLESS tracking_flag_components %]
9+
[%
10+
RETURN UNLESS tracking_flag_components;
11+
12+
# A list of products that will automatically set cf_status_firefox to
13+
# "affected" when filing bugs with nightly. An empty component list
14+
# denotes all components.
15+
auto_affected = {
16+
"Firefox" = [],
17+
"Firefox for Android" = [],
18+
"Firefox OS" = [],
19+
"Core" = [],
20+
"Toolkit" = [],
21+
"Firefox Health Report" = [ "Client: Desktop", "Client: Android" ],
22+
};
23+
24+
# map product names to lowercase
25+
FOREACH key IN auto_affected.keys;
26+
key_lc = key.lower;
27+
auto_affected.$key_lc = auto_affected.item(key);
28+
END;
29+
%]
1030

1131
<script type="text/javascript">
1232
$(function() {
@@ -26,16 +46,27 @@
2646
});
2747
}).click();
2848

29-
[% IF highest_status_firefox %]
30-
$('#version, #bug_status')
49+
[% IF highest_status_firefox && auto_affected.exists(product.name.lower) %]
50+
$('#version, #bug_status, #component')
3151
.change(function() {
3252
var version = $('#version').val();
53+
var component = $('#component').val() || '';
3354
if ($('#bug_status').val() != 'UNCONFIRMED'
3455
&& (
3556
version.toLowerCase() == 'trunk'
3657
|| version == highest_status_firefox + ' Branch'
3758
|| version == 'Firefox ' + highest_status_firefox
38-
))
59+
)
60+
[% auto_components = auto_affected.item(product.name.lower) %]
61+
[% IF auto_components.size %]
62+
&& (
63+
[% FOREACH auto_component IN auto_components %]
64+
[% " || " UNLESS loop.first %]
65+
component.toLowerCase() === '[% auto_component.lower FILTER js %]'
66+
[% END %]
67+
)
68+
[% END %]
69+
)
3970
{
4071
$('#cf_status_firefox' + highest_status_firefox).val('affected');
4172
}

0 commit comments

Comments
 (0)