Koha-clms/circ
Martin Renvoize 92d6fcf2bd
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>
2025-12-01 08:34:05 -07:00
..
add_message.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
article-request-slip.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
article-requests.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
bookcount.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
branchoverdues.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
branchtransfers.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
checkout-notes.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
circulation-home.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
circulation.pl Bug 40866: Remove original Bug 9762 implementation remnants (Part 1) 2025-10-09 14:58:32 -06:00
curbside_pickups.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
del_message.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
hold-transfer-slip.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
on-site_checkouts.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
overdue.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
pendingbookings.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
pendingreserves.pl Bug 40529: Behavior change: Main patch 2025-11-03 14:13:22 -07:00
renew.pl Bug 40866: Remove original Bug 9762 implementation remnants (Part 2 - Renewals) 2025-10-09 14:58:33 -06:00
request-article.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
reserveratios.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
returns.pl Bug 40866: Remove original Bug 9762 implementation remnants (Part 3 - Returns) 2025-10-09 14:58:33 -06:00
set-library.pl Bug 41229: Fix desk and register session persistence on library change 2025-12-01 08:34:05 -07:00
transfer-slip.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
transfers_to_send.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
transferstoreceive.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
view_holdsqueue.pl Bug 40335: Fix mistake in template params 2025-10-14 14:51:57 -06:00
waitingreserves.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00