Bug 35513 - DataTable controls being retained throughout different acq baskets
Summary: DataTable controls being retained throughout different acq baskets
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-06 21:58 UTC by Lucas Gass (lukeg)
Modified: 2023-12-06 22:28 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.