summaryrefslogtreecommitdiffstats
path: root/extensions/ProductDashboard/lib
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-08-09 23:10:47 +0200
committerDave Lawrence <dlawrence@mozilla.com>2012-08-09 23:10:47 +0200
commit5c72835ba89910d7586a1f6b18e6e1cd0a897090 (patch)
tree09c7772cc70a3f2dd9066d51e71228939c43b681 /extensions/ProductDashboard/lib
parentd70cb10238d11536904d2953daec6996e0b5493c (diff)
downloadbugzilla-5c72835ba89910d7586a1f6b18e6e1cd0a897090.tar.gz
bugzilla-5c72835ba89910d7586a1f6b18e6e1cd0a897090.tar.xz
Product Dashboard - Limit assignees to 25
Diffstat (limited to 'extensions/ProductDashboard/lib')
-rw-r--r--extensions/ProductDashboard/lib/Queries.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/extensions/ProductDashboard/lib/Queries.pm b/extensions/ProductDashboard/lib/Queries.pm
index 43d799111..63362f5bf 100644
--- a/extensions/ProductDashboard/lib/Queries.pm
+++ b/extensions/ProductDashboard/lib/Queries.pm
@@ -220,10 +220,12 @@ sub by_value_summary {
}
sub by_assignee {
- my ($product, $bug_status) = @_;
+ my ($product, $bug_status, $limit) = @_;
my $dbh = Bugzilla->dbh;
my $extra;
+ $limit = detaint_natural($limit) ? $dbh->sql_limit($limit) : "";
+
$extra = "AND bugs.bug_status IN (" . open_states() . ")" if $bug_status eq 'open';
$extra = "AND bugs.bug_status IN (" . closed_states() . ")" if $bug_status eq 'closed';
@@ -234,7 +236,8 @@ sub by_assignee {
AND bugs.assigned_to = profiles.userid
$extra
GROUP BY profiles.login_name
- ORDER BY COUNT(bugs.bug_id) DESC", undef, $product->id)};
+ ORDER BY COUNT(bugs.bug_id) DESC $limit",
+ undef, $product->id)};
return \@result;
}