Bug 35513

Summary: DataTable controls being retained throughout different acq baskets
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: AcquisitionsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: andrew
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Lucas Gass (lukeg) 2023-12-06 21:58:17 UTC
To recreate:

1. Add 2 vendors, Vendor A and Vendor B
2. Create a basket with Vendor A that has more than 20 items in it. 
3. Close basket, receive. 
4. Note the URL on are at. Something like /cgi-bin/koha/acqui/basket.pl?basketno=3
5. Create another basket with Vendor B, this one should have less than 10 items. 
6. Close basket, receive. URL /cgi-bin/koha/acqui/basket.pl?basketno=4
7. Now go back to the first basket and change go to the 2nd page ( pagination ). 8. Now open up the 2nd basket, It looks like there are no items but this is because it is trying to paginate to the 2nd page which doesn't exist in this case.
Comment 1 Andrew Fuerste-Henry 2023-12-06 22:14:30 UTC
The same appears to be true of invoices.
Comment 2 Lucas Gass (lukeg) 2023-12-06 22:17:54 UTC
It seems like we are retaining too much in localStorage.

console.log(localStorage):

 "DataTables_pending_orders_/cgi-bin/koha/acqui/parcel.pl": '{"time":1701900452223,"start":20,"length":10,"order":[[1,"asc"]],"search":{"search":"","smart":true,"regex":false,"caseInsensitive":true},"columns":[{"visible":true,"search":{"search":"","smart":true,"regex":false,"caseInsensitive":true}},{"visible":true,"search":{"search":"","smart":true,"regex":false,"caseInsensitive":true}},{"visible":true,"search":{"search":"","smart":true,"regex":false,"caseInsensitive":true}},{"visible":true,"search":{"search":"","smart":true,"regex":false,"caseInsensitive":true}},{"visible":true,"search":{"search":"","smart":true,"regex":false,"caseInsensitive":true}},{"visible":true,"search":{"search":"","smart":true,"regex":false,"caseInsensitive":true}},{"visible":true,"search":{"search":"","smart":true,"regex":false,"caseInsensitive":true}},{"visible":true,"search":{"search":"","smart":true,"regex":false,"caseInsensitive":true}},{"visible":true,"search":{"search":"","smart":true,"regex":false,"caseInsensitive":true}},{"visible":true,"search":{"search":"","smart":true,"regex":false,"caseInsensitive":true}},{"visible":true,"search":{"search":"","smart":true,"regex":false,"caseInsensitive":true}},{"visible":true,"search":{"search":"","smart":true,"regex":false,"caseInsensitive":true}},{"visible":true,"search":{"search":"","smart":true,"regex":false,"caseInsensitive":true}}]}
Comment 3 Lucas Gass (lukeg) 2023-12-06 22:28:46 UTC
To avoid this "stateSave" should be set to false in the dataTable config. However I worry that there is a reason that stateSave is implicitly set to true.