From 689e931003ef5d70d98e767ee424379610b82817 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 --- 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.11.0