summaryrefslogtreecommitdiffstats
path: root/index.cgi
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2014-01-07 00:02:09 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2014-01-07 00:02:09 +0100
commitd4f65f36b7d31d50f39264882c5440b842429bba (patch)
tree29120f1496f249acedbd047f719514bdaf699baa /index.cgi
parent32466314c46ac7fd87c411a4aa01691e75cab6a5 (diff)
downloadbugzilla-d4f65f36b7d31d50f39264882c5440b842429bba.tar.gz
bugzilla-d4f65f36b7d31d50f39264882c5440b842429bba.tar.xz
Bug 390955: Add some useful standard searches to the index page
r=dkl a=sgreen
Diffstat (limited to 'index.cgi')
-rwxr-xr-xindex.cgi13
1 files changed, 13 insertions, 0 deletions
diff --git a/index.cgi b/index.cgi
index 096d48d41..e52d01b03 100755
--- a/index.cgi
+++ b/index.cgi
@@ -45,6 +45,19 @@ if ($user->in_group('admin')) {
$vars->{'release'} = Bugzilla::Update::get_notifications();
}
+if ($user->id) {
+ my $dbh = Bugzilla->dbh;
+ $vars->{assignee_count} =
+ $dbh->selectrow_array('SELECT COUNT(*) FROM bugs WHERE assigned_to = ?
+ AND resolution = ""', undef, $user->id);
+ $vars->{reporter_count} =
+ $dbh->selectrow_array('SELECT COUNT(*) FROM bugs WHERE reporter = ?
+ AND resolution = ""', undef, $user->id);
+ $vars->{requestee_count} =
+ $dbh->selectrow_array('SELECT COUNT(DISTINCT bug_id) FROM flags
+ WHERE requestee_id = ?', undef, $user->id);
+}
+
# Generate and return the UI (HTML page) from the appropriate template.
$template->process("index.html.tmpl", $vars)
|| ThrowTemplateError($template->error());