Koha-clms/circ
Martin Renvoize e43cfd6c65
Bug 41229: Fix desk and register session persistence on library change
When changing library in circ/set-library.pl, desk and register values
were not being properly cleared from the session. This caused stale
desk/register data from the previous library to persist, resulting in:
- Incorrect cashup displays showing wrong library's register
- POS defaulting to registers from different libraries
- Session state inconsistent with visual UI

Three issues fixed:
1. Template: Changed register "None" option ID from "set-library-noregister"
   to "noregister" to match JavaScript expectations (consistent with desk handling)
2. Desk logic: Changed condition to use defined() and explicitly clear session
   when "No desk" is selected
3. Register logic: Added session clearing when "No register" is selected and
   fixed condition to handle empty initial state

Test plan:
1. Select Library A with Register 5
2. Change to Library B without selecting a register
3. Verify register is cleared from session (check POS page)
4. Repeat for desk selection
5. Verify explicit "-- None --" selection clears session values

Signed-off-by: Jason Robb <jrobb@sekls.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 92d6fcf2bd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit bb90bd0bab)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-04 15:13:21 +01:00
..
add_message.pl Bug 38095: Include logged-in branch in custom patron message 2025-08-04 11:56:29 +02:00
article-request-slip.pl Bug 38089: (follow-up) More fixes for errors in original submission 2024-10-11 11:13:47 +02: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 25682: Style transfers interface to match checkin page 2024-04-29 18:53:07 +02: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 39604: Remember cancelreserve choice when remembering patron for session 2025-10-06 17:41:06 +02:00
curbside_pickups.pl Bug 37761: Fix redirection on the tabs and buttons 2025-03-19 23:57:45 +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 38089: (follow-up) More fixes for errors in original submission 2024-10-11 11:13:47 +02:00
on-site_checkouts.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
overdue.pl Bug 31167: Only mark due dates in the past red on overdues report 2025-08-08 10:44:15 +02:00
pendingbookings.pl Bug 33736: Add filter for holding library 2024-10-25 11:09:55 +02:00
pendingreserves.pl Bug 40515: Fix regexp for cud-mark_as_lost_and_notify 2025-10-10 15:08:27 +02: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 23208: Add ability to set a default hold ratio value 2024-03-25 09:53:22 +01:00
returns.pl Bug 39180: Catch exception when updating patron lastseen date 2025-09-17 17:01:21 +02:00
set-library.pl Bug 41229: Fix desk and register session persistence on library change 2025-12-04 15:13:21 +01:00
transfer-slip.pl Bug 38089: (follow-up) More fixes for errors in original submission 2024-10-11 11:13:47 +02: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 17338: Fix redirection to correct tabs on waitingreserves.pl 2025-05-26 20:17:04 +02:00