From 18f3661179e6a556fc1c39a8841edb99e4e97cd9 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 22 Apr 2020 12:11:53 +0000 Subject: [PATCH] Bug 25247: Only convert data ot objects when displaying on screen To test: 1 - Modify a patron 2 - Circulate some items to the patron 3 - Click 'Modification log' 4 - Verify you see your actions 5 - Under 'Output' select 'To a file' 6 - Save the output to a file 7 - View the file 8 - Not you have references ot objects in stead of patron/item data 9 - Apply patch 10 - Repeat 11 - Note viewing on screen has not changed 12 - Note exporting to file inlcudes borrower/item numbers and not references 13 - Sign off Signed-off-by: Jonathan Druart Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize --- tools/viewlog.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/viewlog.pl b/tools/viewlog.pl index e6630cf9f8..2ccd472f0e 100755 --- a/tools/viewlog.pl +++ b/tools/viewlog.pl @@ -174,7 +174,7 @@ if ($do_it) { #always add firstname and surname for librarian/user if ( $log->user ) { my $patron = Koha::Patrons->find( $log->user ); - if ($patron) { + if ($patron && $output eq 'screen') { $result->{librarian} = $patron; } } @@ -183,7 +183,7 @@ if ($do_it) { if ( $log->module eq "CIRCULATION" || $log->module eq "MEMBERS" || $log->module eq "FINES" ) { if ( $log->object ) { my $patron = Koha::Patrons->find( $log->object ); - if ($patron) { + if ($patron && $output eq 'screen') { $result->{patron} = $patron; } } -- 2.39.5