Bug 39268

Summary: When switching tabs between 'My lists' and 'Public lists' incorrect lists can be displayed
Product: Koha Reporter: Laura Escamilla <Laura.escamilla>
Component: ListsAssignee: Owen Leonard <oleonard>
Status: Pushed to stable --- QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: normal    
Priority: P5 - low CC: kebliss, lucas, m.de.rooy, martin.renvoize, paul.derscheid, rcoert, roman.dolny, tgoatley
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
25.05.00, 24.11.03
Circulation function:
Bug Depends on: 35402    
Bug Blocks:    
Attachments: Bug 39268: Fix tab switching on lists page
Bug 39268: Fix tab switching on lists page
Bug 39268: Fix tab switching on lists page

Description Laura Escamilla 2025-03-06 18:52:11 UTC
There is an issue with the "Your Lists" and "Public Lists" tabs where the list content doesn't update correctly when switching between them. Initially, the lists display correctly. However, when a user clicks between the tabs (e.g., from 'Public Lists' to 'Private Lists' or vice versa), the list content remains stuck on the first tab's content. For instance, if a user starts on the 'Private Lists' tab and switches to the 'Public Lists' tab, the lists from 'Private Lists' continue to display even though the 'Public Lists' tab is selected. Similarly, if a user switches from 'Public Lists' to 'Private Lists', the 'Public Lists' remain visible.

This issue persists until the page is refreshed, at which point the lists reset, but the same behavior occurs again upon switching tabs. This causes confusion, especially for staff who need to view both private and public lists and expect the tab content to reflect the selected tab.
Comment 1 Owen Leonard 2025-03-06 20:40:48 UTC
Created attachment 179020 [details] [review]
Bug 39268: Fix tab switching on lists page

This patch fixes broken tab switching on the staff interface lists page.
It was broken by the upgrade to Bootstrap 5.

To test, apply the patch and go to the Lists page in the staff
interface.

- If necessary, create multiple public and private lists.
- Confirm that switching between the "Your lists" tab and the "Public
  lists" tab works correctly.
- Try using URL parameters to load each tab:
  http://127.0.0.1:8081/cgi-bin/koha/virtualshelves/shelves.pl?op=list&public=0
  http://127.0.0.1:8081/cgi-bin/koha/virtualshelves/shelves.pl?op=list&public=1

Sponsored-by: Athens County Public Libraries
Comment 2 Lucas Gass (lukeg) 2025-03-06 21:42:11 UTC
Created attachment 179022 [details] [review]
Bug 39268: Fix tab switching on lists page

This patch fixes broken tab switching on the staff interface lists page.
It was broken by the upgrade to Bootstrap 5.

To test, apply the patch and go to the Lists page in the staff
interface.

- If necessary, create multiple public and private lists.
- Confirm that switching between the "Your lists" tab and the "Public
  lists" tab works correctly.
- Try using URL parameters to load each tab:
  http://127.0.0.1:8081/cgi-bin/koha/virtualshelves/shelves.pl?op=list&public=0
  http://127.0.0.1:8081/cgi-bin/koha/virtualshelves/shelves.pl?op=list&public=1

Sponsored-by: Athens County Public Libraries
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 3 Martin Renvoize (ashimema) 2025-03-10 12:04:31 UTC
Created attachment 179099 [details] [review]
Bug 39268: Fix tab switching on lists page

This patch fixes broken tab switching on the staff interface lists page.
It was broken by the upgrade to Bootstrap 5.

To test, apply the patch and go to the Lists page in the staff
interface.

- If necessary, create multiple public and private lists.
- Confirm that switching between the "Your lists" tab and the "Public
  lists" tab works correctly.
- Try using URL parameters to load each tab:
  http://127.0.0.1:8081/cgi-bin/koha/virtualshelves/shelves.pl?op=list&public=0
  http://127.0.0.1:8081/cgi-bin/koha/virtualshelves/shelves.pl?op=list&public=1

Sponsored-by: Athens County Public Libraries
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Katrin Fischer 2025-03-13 09:30:19 UTC
Pushed for 25.05!

Well done everyone, thank you!
Comment 5 Todd Goatley 2025-03-18 23:46:13 UTC
Greatly appreciated if this could be backported to 24.11! Cheers and thank you!
Comment 6 Paul Derscheid 2025-03-19 23:19:19 UTC
Nice work everyone!

Pushed to 24.11.x for 24.11.03