From a5250581d44100f13445b244688ed20fbf273d85 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 9 Oct 2025 07:31:43 +0100 Subject: [PATCH] Bug 40866: Remove original Bug 9762 implementation remnants (Part 3 - Returns) This patch removes the duplicate logging code from circ/returns.pl that was part of the original Bug 9762 implementation. The original implementation added a separate logaction() call when ignoring holds on return. This code created a custom JSON log entry with the message "return an element that is reserved". However, this logging appears to have been orphaned - there is no corresponding Alternative implementation for return override logging in the current codebase. The code was creating log entries but they were not properly integrated with any override confirmation workflow. Changes: circ/returns.pl: - Removed entire else block that created custom override log entries - Removed unused variables: $message, @message, $user, $branchcode, $barcode - Removed C4::Log qw(logaction) import as it's no longer needed This eliminates the orphaned logging code and ensures returns.pl only uses standard Koha logging mechanisms. Signed-off-by: Andrew Fuerste Henry --- circ/returns.pl | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/circ/returns.pl b/circ/returns.pl index e3453a3ed54..35c3367ea4b 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -42,7 +42,6 @@ use C4::Members; use C4::Output qw( output_html_with_http_headers ); use C4::Reserves qw( ModReserve ModReserveAffect CheckReserves ); use C4::RotatingCollections; -use C4::Log qw( logaction ); use Koha::AuthorisedValues; use Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue; use Koha::BiblioFrameworks; @@ -160,32 +159,6 @@ if ( $query->param('reserve_id') && $op eq 'cud-affect_reserve' ) { $transfer->transit; } } -} else { - my $message = "return an element that is reserved"; - my @message = ("return an element that is reserved"); - my $user = C4::Context->userenv->{number}; - my $branchcode = C4::Context->userenv->{branch}; - my $barcode = $query->param('barcode'); - - my $infos = ( - { - message => \@message, - - #'card number' => $cardnumber, - barcode => $barcode, - manager_id => $user, - branchcode => $branchcode, - } - ); - - my $json_infos = JSON->new->utf8->pretty->encode($infos); - $json_infos =~ s/"/'/g; - - logaction( - "CIRCULATION", "RETURN", - $session, - $json_infos, - ) if C4::Context->preference("ReturnLog"); } if ( $query->param('recall_id') && $op eq 'cud-affect_recall' ) { -- 2.39.5