diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2014-01-07 00:02:09 +0100 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2014-01-07 00:02:09 +0100 |
commit | d4f65f36b7d31d50f39264882c5440b842429bba (patch) | |
tree | 29120f1496f249acedbd047f719514bdaf699baa /index.cgi | |
parent | Bug 945535 - When loading bugs with large number of attachments, $bug->attach... (diff) | |
download | bugzilla-d4f65f36b7d31d50f39264882c5440b842429bba.tar.gz bugzilla-d4f65f36b7d31d50f39264882c5440b842429bba.tar.bz2 bugzilla-d4f65f36b7d31d50f39264882c5440b842429bba.zip |
Bug 390955: Add some useful standard searches to the index page
r=dkl a=sgreen
Diffstat (limited to 'index.cgi')
-rwxr-xr-x | index.cgi | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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()); |