From b08855fc693d0a007b91771468414647bc7ebace Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 1 May 2024 12:58:17 +0100 Subject: [PATCH] Bug 27753: (QA follow-up) Use librarian as resolver This patch updates the changed code to set the logged in librarian as the person who resolved the return claim at checkin/checkout action. Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- C4/Circulation.pm | 2 +- circ/circulation.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 2e24b99075..bff0b1e2f5 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2546,7 +2546,7 @@ sub AddReturn { my $autoClaimReturnCheckin = C4::Context->preference('AutoClaimReturnStatusOnCheckin'); if ($autoClaimReturnCheckin) { - my $patron_id = $patron->borrowernumber; + my $patron_id = C4::Context->userenv ? C4::Context->userenv->{'number'} : undef; my $resolution = $autoClaimReturnCheckin; $claim->resolve( diff --git a/circ/circulation.pl b/circ/circulation.pl index 81e0f337ae..d1c2b3b0cf 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -450,7 +450,7 @@ if (@$barcodes && $op eq 'cud-checkout') { if ($autoClaimReturnCheckout) { my $claim = $claims->next; - my $patron_id = $patron->borrowernumber; + my $patron_id = $logged_in_user->borrowernumber; my $resolution = $autoClaimReturnCheckout; $claim->resolve( -- 2.39.5