diff options
-rwxr-xr-x | duplicates.cgi | 12 | ||||
-rw-r--r-- | template/en/default/reports/duplicates-table.html.tmpl | 4 | ||||
-rw-r--r-- | template/en/default/reports/duplicates.html.tmpl | 9 |
3 files changed, 13 insertions, 12 deletions
diff --git a/duplicates.cgi b/duplicates.cgi index 27333cbab..fb5497218 100755 --- a/duplicates.cgi +++ b/duplicates.cgi @@ -78,16 +78,16 @@ my $changedsince = formvalue("changedsince", 7); my $maxrows = formvalue("maxrows", 100); my $openonly = formvalue("openonly"); my $reverse = formvalue("reverse") ? 1 : 0; -my $product = formvalue("product"); +my @query_products = $cgi->param('product'); my $sortvisible = formvalue("sortvisible"); my @buglist = (split(/[:,]/, formvalue("bug_id"))); my $product_id; -if ($product) { - $product_id = get_product_id($product); +foreach my $p (@query_products) { + $product_id = get_product_id($p); if (!$product_id) { ThrowUserError("invalid_product_name", - { product => $product }); + { product => $p }); } } @@ -209,7 +209,7 @@ if (scalar(%count)) { # Restrict to product if requested if ($::FORM{'product'}) { - $params->param('product', $::FORM{'product'}); + $params->param('product', join(',', @query_products)); } my $query = new Bugzilla::Search('fields' => [qw(bugs.bug_id @@ -258,7 +258,7 @@ $vars->{'maxrows'} = $maxrows; $vars->{'openonly'} = $openonly; $vars->{'reverse'} = $reverse; $vars->{'format'} = $::FORM{'format'}; -$vars->{'product'} = $product; +$vars->{'query_products'} = \@query_products; $vars->{'products'} = \@::legal_product; diff --git a/template/en/default/reports/duplicates-table.html.tmpl b/template/en/default/reports/duplicates-table.html.tmpl index 34e070f10..d2205f2c0 100644 --- a/template/en/default/reports/duplicates-table.html.tmpl +++ b/template/en/default/reports/duplicates-table.html.tmpl @@ -39,7 +39,7 @@ # maxrows: integer. Max number of rows to display. # changedsince: integer. The number of days ago for the changedsince column. # openonly: boolean. True if we are only showing open bugs. - # product: string. Restrict to this product only. + # query_products: list of strings. Restrict to these products only. #%] [% PROCESS global/variables.none.tmpl %] @@ -78,7 +78,7 @@ [% "&maxrows=$maxrows" IF maxrows %] [% "&changedsince=$changedsince" IF changedsince %] [% "&openonly=1" IF openonly %] - [% IF product %]&product=[% product FILTER html %][% END %] + [% FOREACH p = query_products %]&product=[% p FILTER html %][% END %] [% IF format %]&format=[% format FILTER html %][% END %] [% "&bug_id=$bug_ids_string&sortvisible=1" IF sortvisible %]"> diff --git a/template/en/default/reports/duplicates.html.tmpl b/template/en/default/reports/duplicates.html.tmpl index bff971f89..fb3184cf6 100644 --- a/template/en/default/reports/duplicates.html.tmpl +++ b/template/en/default/reports/duplicates.html.tmpl @@ -27,7 +27,7 @@ # maxrows: integer. Max number of rows to display. # changedsince: integer. The number of days ago for the changedsince column. # openonly: boolean. True if we are only showing open bugs. - # product: string. Restrict to this product only. + # query_products: list of strings. The set of products we check for dups. # # Additionally, you need to fulfill the interface to # duplicates-table.html.tmpl. @@ -35,8 +35,8 @@ [% PROCESS global/variables.none.tmpl %] -[% IF product %] - [% title = "Most Frequently Reported $terms.Bugs for $product" %] +[% IF query_products.size %] + [% title = "Most Frequently Reported $terms.Bugs for ${query_products.join(', ')}" %] [% ELSE %] [% title = "Most Frequently Reported $terms.Bugs" %] [% END%] @@ -85,7 +85,8 @@ <select name="product" size="5" multiple="multiple"> [% FOREACH p = products %] <option name="[% p FILTER html %]" - [% " selected" IF product == p %]>[% p FILTER html %]</option> + [% " selected" IF lsearch(query_products, p) != -1 %] + >[% p FILTER html %]</option> [% END %] </select> </td> |