Koha/circ
Michael Hafen 4d351d2c6d
Bug 36139: Bug 35518 Follow-up to fix AutoSwitchPatron - clear variables
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.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-22 15:47:31 +01:00
..
add_message.pl Bug 34478: Manual fix - add op and change link to form - members-toolbar.inc / patron_messages.inc 2024-03-01 10:57:26 +01:00
article-request-slip.pl Bug 29771: Scalar context for split 2022-03-08 23:03:34 -10:00
article-requests.pl Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
bookcount.pl Bug 33149: Use template wrapper for breadcrumbs: Circulation part 1 2023-04-06 09:29:26 -03:00
branchoverdues.pl Bug 34478: op =~ ^cud- in pl/pm - Manual cud-email => email 2024-03-01 10:57:14 +01:00
branchtransfers.pl Bug 34478: Add 'op' to circ/branchtransfers 2024-03-01 10:58:31 +01:00
checkout-notes.pl Bug 34478: Rename action with op - circ/checkout-notes 2024-03-01 10:56:39 +01:00
circulation-home.pl Bug 33961: Remove built-in offline circ tool 2023-06-12 16:53:25 -03:00
circulation.pl Bug 36139: Bug 35518 Follow-up to fix AutoSwitchPatron - clear variables 2024-03-22 15:47:31 +01:00
curbside_pickups.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00
del_message.pl Bug 34478: Manual fix - add op and change link to form - members-toolbar.inc / patron_messages.inc 2024-03-01 10:57:26 +01:00
hold-transfer-slip.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
on-site_checkouts.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
overdue.pl Bug 30718: Use flatpickr's altInput 2022-08-19 08:26:31 -03:00
pendingreserves.pl Bug 33431: Fix remaining cases 2024-03-18 11:03:39 +01:00
renew.pl Bug 34478: Add 'op' to circ/renew.pl 2024-03-01 10:58:48 +01:00
request-article.pl Bug 34478: Rename action with op - circ/request-article 2024-03-01 10:56:39 +01:00
reserveratios.pl Bug 34938: (QA follow-up) Tidy code 2023-11-08 11:41:32 -03:00
returns.pl Bug 34478: Manual fix - add cud- ops or remove form submit - returns.tt / checkin-search-box.inc 2024-03-01 10:59:44 +01:00
set-library.pl Bug 34478: Fix circ/set-library 2024-03-01 10:58:21 +01:00
transfer-slip.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00
transfers_to_send.pl Bug 35388: Add comment to 'Transfers to send' 2024-03-19 18:09:07 +01:00
transferstoreceive.pl Bug 24295: Remove GetTransfers from circ/transferstoreceive.pl 2022-08-26 15:42:52 -03:00
view_holdsqueue.pl Bug 28966: Prefetch patron data for holds queue viewer 2023-07-25 16:25:38 -03:00
waitingreserves.pl Bug 34478: Manual fix - add ops / change confirmation forms to get - waiting_holds.inc / waitingreserves.tt 2024-03-01 10:57:25 +01:00