summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2011-12-21 18:42:51 +0100
committerDave Lawrence <dlawrence@mozilla.com>2011-12-21 18:42:51 +0100
commiteca4822f0ad4733af64425c10b9edd1d7ca62772 (patch)
tree1f7684f00e053b80a6d0ffadf1aa147e4e9e2fc4 /extensions
parent5cbb1c79abf94ffdd55f554c910da64cd9782503 (diff)
downloadbugzilla-eca4822f0ad4733af64425c10b9edd1d7ca62772.tar.gz
bugzilla-eca4822f0ad4733af64425c10b9edd1d7ca62772.tar.xz
merged with bmo/4.0
Diffstat (limited to 'extensions')
-rw-r--r--extensions/BMO/Extension.pm27
-rw-r--r--extensions/BMO/lib/Data.pm8
-rw-r--r--extensions/BMO/template/en/default/global/choose-product.html.tmpl13
-rw-r--r--extensions/RequestWhiner/bin/whineatrequests.pl13
-rw-r--r--extensions/RequestWhiner/template/en/default/requestwhiner/mail.html.tmpl26
-rw-r--r--extensions/RequestWhiner/template/en/default/requestwhiner/mail.txt.tmpl25
6 files changed, 84 insertions, 28 deletions
diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm
index e8e58db27..44a1a3e69 100644
--- a/extensions/BMO/Extension.pm
+++ b/extensions/BMO/Extension.pm
@@ -186,6 +186,26 @@ sub _get_field_values_sort_key {
return \%field_values;
}
+sub active_custom_fields {
+ my ($self, $args) = @_;
+ my $fields = $args->{'fields'};
+ my $params = $args->{'params'};
+ my $product = $params->{'product'};
+ my $component = $params->{'component'};
+
+ return if !$product;
+
+ my $product_name = blessed $product ? $product->name : $product;
+ my $component_name = blessed $component ? $component->name : $component;
+
+ my @tmp_fields;
+ foreach my $field (@$$fields) {
+ next if cf_hidden_in_product($field->name, $product_name, $component_name, $params->{'type'});
+ push(@tmp_fields, $field);
+ }
+ $$fields = \@tmp_fields;
+}
+
sub cf_hidden_in_product {
my ($field_name, $product_name, $component_name, $custom_flag_mode) = @_;
@@ -196,8 +216,11 @@ sub cf_hidden_in_product {
# Also in buglist.cgi, we pass in a list of components instead
# of a single compoent name everywhere else.
- my $component_list = ref $component_name ? $component_name
- : [ $component_name ];
+ my $component_list = [];
+ if ($component_name) {
+ $component_list = ref $component_name ? $component_name
+ : [ $component_name ];
+ }
if ($custom_flag_mode) {
if ($custom_flag_mode == 1) {
diff --git a/extensions/BMO/lib/Data.pm b/extensions/BMO/lib/Data.pm
index be829e786..93118f5b1 100644
--- a/extensions/BMO/lib/Data.pm
+++ b/extensions/BMO/lib/Data.pm
@@ -52,6 +52,7 @@ tie(%$cf_visible_in_products, "Tie::IxHash",
"AUS" => [],
"Core" => [],
"Fennec" => [],
+ "Fennec Native" => [],
"mozilla.org" => ["Release Engineering"],
"Mozilla Services" => [],
"NSPR" => [],
@@ -82,6 +83,7 @@ tie(%$cf_visible_in_products, "Tie::IxHash",
"Core" => [],
"Directory" => [],
"Fennec" => [],
+ "Fennec Native" => [],
"Firefox" => [],
"MailNews Core" => [],
"mozilla.org" => ["Release Engineering"],
@@ -178,6 +180,12 @@ our $cf_disabled_flags = [
'cf_status_thunderbird7',
'cf_tracking_seamonkey24',
'cf_status_seamonkey24',
+ 'cf_tracking_firefox8',
+ 'cf_status_firefox8',
+ 'cf_tracking_thunderbird8',
+ 'cf_status_thunderbird8',
+ 'cf_tracking_seamonkey25',
+ 'cf_status_seamonkey25',
];
# Who to CC on particular bugmails when certain groups are added or removed.
diff --git a/extensions/BMO/template/en/default/global/choose-product.html.tmpl b/extensions/BMO/template/en/default/global/choose-product.html.tmpl
index 7e0a8dc18..9daae1d25 100644
--- a/extensions/BMO/template/en/default/global/choose-product.html.tmpl
+++ b/extensions/BMO/template/en/default/global/choose-product.html.tmpl
@@ -125,7 +125,18 @@ href="http://www.mozilla.org/support/">Visit the mozilla.org support page</a> be
[% END %]
[% FOREACH p = c.products %]
- <tr>
+ [% class = "" %]
+ [% has_entry_groups = 0 %]
+ [% FOREACH gid = p.group_controls.keys %]
+ [% IF p.group_controls.$gid.entry %]
+ [% has_entry_groups = 1 %]
+ [% class = class _ " group_$gid" %]
+ [% END %]
+ [% END %]
+ <tr class="[% "group_secure" IF has_entry_groups +%] [% class FILTER html %]"
+ [%- IF has_entry_groups %] title="This product requires one or more
+ group memberships in order to enter [% terms.bugs %] in it. You have them, but be
+ aware not everyone else does."[% END %]>
<th align="right" valign="top">
[% IF p.name == "Mozilla PR" AND target == "enter_bug.cgi" AND NOT format AND NOT cgi.param("debug") %]
<a href="[% target FILTER uri %]?product=[% p.name FILTER uri -%]
diff --git a/extensions/RequestWhiner/bin/whineatrequests.pl b/extensions/RequestWhiner/bin/whineatrequests.pl
index 622438b4f..b7ac8f029 100644
--- a/extensions/RequestWhiner/bin/whineatrequests.pl
+++ b/extensions/RequestWhiner/bin/whineatrequests.pl
@@ -40,7 +40,8 @@ my $dbh = Bugzilla->dbh;
my $sth_get_requests =
$dbh->prepare("SELECT profiles.login_name,
- flagtypes.name,
+ flagtypes.name,
+ flags.attach_id,
bugs.bug_id,
bugs.short_desc, " .
$dbh->sql_to_days('NOW()') .
@@ -68,6 +69,7 @@ my $requests = {};
while (my ($login_name,
$flag_name,
+ $attach_id,
$bug_id,
$short_desc,
$age_in_days) = $sth_get_requests->fetchrow_array())
@@ -81,9 +83,10 @@ while (my ($login_name,
}
push(@{ $requests->{$login_name}->{$flag_name} }, {
- id => $bug_id,
- summary => $short_desc,
- age => $age_in_days
+ bug_id => $bug_id,
+ attach_id => $attach_id,
+ summary => $short_desc,
+ age => $age_in_days
});
}
@@ -97,7 +100,7 @@ foreach my $recipient (keys %$requests) {
mail({
from => Bugzilla->params->{'mailfrom'},
recipient => $user,
- subject => "Outstanding Requests",
+ subject => "Your Outstanding Requests",
requests => $requests->{$recipient},
threshold => WHINE_AFTER_DAYS
});
diff --git a/extensions/RequestWhiner/template/en/default/requestwhiner/mail.html.tmpl b/extensions/RequestWhiner/template/en/default/requestwhiner/mail.html.tmpl
index de2c4dc6a..07b2b31ee 100644
--- a/extensions/RequestWhiner/template/en/default/requestwhiner/mail.html.tmpl
+++ b/extensions/RequestWhiner/template/en/default/requestwhiner/mail.html.tmpl
@@ -29,17 +29,27 @@
</head>
<body bgcolor="#FFFFFF">
-<p>Here are your outstanding requests older than [% threshold FILTER html%]
-days:</p>
+<p>The following is a list of requests people have made of you, which have been
+outstanding more than [% threshold FILTER html %] days. To avoid disappointing
+others, please deal with them as quickly as possible.
+(<a href="https://wiki.mozilla.org/BMO/Handling_Requests">Here is some
+guidance on handling requests</a>.)
+</p>
-[% FOREACH request = requests.keys %]
-<h3>[% request FILTER html %]</h3>
+[% FOREACH request_type = requests.keys %]
+<h3>[% request_type FILTER html %]</h3>
<ul>
- [% FOREACH bug = requests.$request %]
+ [% FOREACH request = requests.$request_type %]
<li>
- <a href="[% urlbase FILTER none %]show_bug.cgi?id=[% bug.id FILTER none %]">[% terms.Bug %]
- [%+ bug.id FILTER none %]: [% bug.summary FILTER html %]</a> ([% bug.age FILTER none %] days old)
+ <a href="[% urlbase FILTER none %]show_bug.cgi?id=[% request.bug_id FILTER none %]">[% terms.Bug %]
+ [%+ request.bug_id FILTER none %]: [% request.summary FILTER html %]</a> ([% request.age FILTER none %] days old)
+ [% IF request.attach_id %]
+ <br>
+ <small>(<a href="[% urlbase FILTER none %]attachment.cgi?id=[% request.attach_id FILTER none %]&action=edit">Details</a> |
+ <a href="[% urlbase FILTER none %]attachment.cgi?id=[% request.attach_id FILTER none %]&action=diff">Diff</a> |
+ <a href="[% urlbase FILTER none %]page.cgi?id=splinter.html&bug=[% request.bug_id FILTER none %]&attachment=[% request.attach_id FILTER none %]">Splinter Review</a>)</small>
+ [% END %]
</li>
[% END %]
</ul>
@@ -48,7 +58,5 @@ days:</p>
<p><a href="[% urlbase FILTER none %]request.cgi?action=queue&requestee=[% recipient.email FILTER uri %]&group=type">See all your outstanding requests</a>.</p>
-<p>A href="https://wiki.mozilla.org/BMO/Handling_Requests">Get guidance on handling requests</a>.</p>
-
</body>
</html>
diff --git a/extensions/RequestWhiner/template/en/default/requestwhiner/mail.txt.tmpl b/extensions/RequestWhiner/template/en/default/requestwhiner/mail.txt.tmpl
index a7cfd9668..c8091c057 100644
--- a/extensions/RequestWhiner/template/en/default/requestwhiner/mail.txt.tmpl
+++ b/extensions/RequestWhiner/template/en/default/requestwhiner/mail.txt.tmpl
@@ -20,19 +20,22 @@
[% PROCESS global/variables.none.tmpl %]
[% PROCESS 'global/field-descs.none.tmpl' %]
-Here are your outstanding requests older than [% threshold %] days:
+The following is a list of requests people have made of you, which have been
+outstanding more than [% threshold %] days. To avoid disappointing others, please deal with
+them as quickly as possible. Here is some guidance on handling requests:
+ https://wiki.mozilla.org/BMO/Handling_Requests
-[% FOREACH request = requests.keys %]
-[%+ request +%]
-[%+ "-" FILTER repeat(request.length) +%]
+[% FOREACH request_type = requests.keys %]
+[%+ request_type +%]
+[%+ "-" FILTER repeat(request_type.length) +%]
- [% FOREACH bug = requests.$request %]
- [%+ terms.Bug +%] [%+ bug.id %]: [% bug.summary +%] ([% bug.age %] days old)
- [%+ urlbase %]show_bug.cgi?id=[% bug.id +%]
+ [% FOREACH request = requests.$request_type %]
+ [%+ terms.Bug +%] [%+ request.bug_id %]: [% request.summary +%] ([% request.age %] days old)
+ [%+ urlbase %]show_bug.cgi?id=[% request.bug_id +%]
+ [% IF request.attach_id %]
+ [%+ urlbase %]attachment.cgi?id=[% request.attach_id %]&action=edit
+ [% END %]
[%+ END +%]
[% END %]
To see all your outstanding requests, visit:
-[%+ urlbase %]request.cgi?action=queue&requestee=[% recipient.email FILTER uri %]&group=type
-
-For guidance on handling requests, see:
-https://wiki.mozilla.org/BMO/Handling_Requests
+[%+ urlbase %]request.cgi?action=queue&requestee=[% recipient.email FILTER url_quote %]&group=type