Bugzilla – Attachment 162310 Details for
Bug 36139
Bug 35518 follow-up: fix AutoSwitchPatron
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35518 Follow-up to fix AutoSwitchPatron - clear variables
0001-Bug-36139-Bug-35518-Follow-up-to-fix-AutoSwitchPatro.patch (text/plain), 2.03 KB, created by
Michael Hafen
on 2024-02-20 21:24:27 UTC
(
hide
)
Description:
Bug 35518 Follow-up to fix AutoSwitchPatron - clear variables
Filename:
MIME Type:
Creator:
Michael Hafen
Created:
2024-02-20 21:24:27 UTC
Size:
2.03 KB
patch
obsolete
>From 8e2e62f5eedd7067b3a90410a1483b7dec4bb9ce Mon Sep 17 00:00:00 2001 >From: Michael Hafen <michael.hafen@washk12.org> >Date: Tue, 20 Feb 2024 14:18:59 -0700 >Subject: [PATCH] Bug 36139: Bug 35518 Follow-up to fix AutoSwitchPatron - > clear variables >Content-Type: text/plain; charset="utf-8" > >Bug 35518 moved some code blocks to after the call to >get_user_and_template() so that userenv would be populated before it >was needed. This caused a couple variables to be set before the >AutoSwitchPatron block could prevent them from being set. Which broke >AutoSwitchPatron functionality. This clears two variable so that >AuthSwitchPatron works again. > >The AutoSwitchPatron clears the $borrowernumber variable to switch >patrons. With the AuthSwitchPatron block moved, the $patron variable >still gets set, and the patron doesn't get switched. The clears the >$patron variable too. > >Also clear the barcode list. >The AutoSwitchPatron block got moved, and now the @$barcodes variable >gets filled and not cleared. Leading to a 'Barcode not found' error >when the patron is auto switched. > >Test plan: >1. Ensure AutoSwitchPatron is turned on. >2. Select the card number of two patron accounts. >3. Find the first patron in circulation. >4. Enter the second patron's card number in the item barcode field to > switch patrons. >5. Observe the error about item barcode not existing, and the patron did > not switch. >6. Apply patch and restart services. >7. Enter the second patron's card number in the item barcode field > again. >8. Observe that the patron was switched with no error about an invalid > barcode. >--- > circ/circulation.pl | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 9296d9e642..336c1c411c 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -131,6 +131,8 @@ if ( C4::Context->preference("AutoSwitchPatron") && $barcode ) { > $findborrower = $barcode; > undef $barcode; > undef $borrowernumber; >+ undef $patron; >+ $barcodes = []; > $autoswitched = 1; > } > } >-- >2.34.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36139
:
162310
|
163287
|
163708