Bug 221900: duplicates.cgi query fails if more than one product selected; patch by chaduv <caduvall@glue.umd.edu>; r=gerv; a=justdave.
git-svn-id: svn://10.0.0.236/trunk@148400 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
|
||||
@@ -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 %]">
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user