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 <andrew@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9ce4533b75)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
parent
ad8c00c781
commit
40d5b8b2e5
|
|
@ -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::BiblioFrameworks;
|
||||
use Koha::Calendar;
|
||||
|
|
@ -159,32 +158,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' ) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue