From 903fc1729b3707feeb6bf9853f497a17f6a7e2d6 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 11 Mar 2020 09:06:09 +0000 Subject: [PATCH] Bug 4461: (follow-up) Add missing relationship accessor I think this was a simple case of Aliesha missing a file when commiting. So I could proceed with testing I just quickly re-implimented the patron relationship accessor. Signed-off-by: Martin Renvoize Signed-off-by: David Nind Signed-off-by: Jonathan Druart --- Koha/ProblemReport.pm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Koha/ProblemReport.pm b/Koha/ProblemReport.pm index f93f7fac49..01a440b83b 100644 --- a/Koha/ProblemReport.pm +++ b/Koha/ProblemReport.pm @@ -33,6 +33,20 @@ Koha::ProblemReport - Koha Problem Report Object class =cut +=head3 patron + +my $patron = $report->patron + +Return the patron for who the report has been done + +=cut + +sub patron { + my ( $self ) = @_; + my $patron_rs = $self->_result->borrowernumber; + return Koha::Patron->_new_from_dbic( $patron_rs ); +} + =head3 type =cut -- 2.20.1