From 5b25f5c1f223643246750f74538fe1e95aea4382 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Wed, 27 Aug 2014 10:34:21 -0400 Subject: Bug 1021902 - UI to view a user's review history r=glob --- extensions/Review/Extension.pm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'extensions/Review/Extension.pm') diff --git a/extensions/Review/Extension.pm b/extensions/Review/Extension.pm index 78e19f9b7..8a7a9fe62 100644 --- a/extensions/Review/Extension.pm +++ b/extensions/Review/Extension.pm @@ -601,6 +601,9 @@ sub page_before_template { elsif ($args->{page_id} eq 'review_requests_rebuild.html') { $self->review_requests_rebuild($args); } + elsif ($args->{page_id} eq 'review_history.html') { + $self->review_history($args); + } } sub review_suggestions_report { @@ -655,6 +658,21 @@ sub review_requests_rebuild { } } +sub review_history { + my ($self, $args) = @_; + + my $user = Bugzilla->login(LOGIN_REQUIRED); + + Bugzilla::User::match_field({ 'requestee' => { 'type' => 'single' } }); + my $requestee = Bugzilla->input_params->{requestee}; + if ($requestee) { + $args->{vars}{requestee} = Bugzilla::User->check({ name => $requestee, cache => 1 }); + } + else { + $args->{vars}{requestee} = $user; + } +} + # # installation # -- cgit v1.2.3-24-g4f1b