From d4f65f36b7d31d50f39264882c5440b842429bba Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Tue, 7 Jan 2014 00:02:09 +0100 Subject: Bug 390955: Add some useful standard searches to the index page r=dkl a=sgreen --- index.cgi | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'index.cgi') 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()); -- cgit v1.2.3-24-g4f1b