Bug 22276 added a method to columns_settings.inc to support the use of the DataTables "saveState" option. Making use of that function in suggestion.tt would enable the suggestion table to remember individual users' local changes to the table configuration.
I'd love to see that :)
Created attachment 149222 [details] [review] Bug 33426: Add DataTables saveState to suggestion.tt To test: 1. In the staff client, go to Purchase Suggestion management page and add a suggestion if needed to make the table display. 2. Make some changes to the table settings (hide/show columns, change sort column, and/or change number of rows to display) 3. Navigate to a different page. 4. Navigate back to Purchase Suggestions page. Note that the table settings have been reset. 5. Apply patch and restart_all 6. Repeat steps 1-4. Note that this time the changes to the table settings were preserved.
(In reply to Katrin Fischer from comment #1) > I'd love to see that :) Granted :)
Should we use this bug as is.. or attempt to generalise the pattern.. I feel like we could move the code into our KohaTable wrappers and make it work for all cases
Please see bug 33484 for a more global approach to this.
Awesome work btw Emily.. I didn't mean to rain on your parade here.. the code works perfectly here and I'll SO on it.. we can perhaps replace with bug 33484 once it's ready and keep your work here credited :)
Created attachment 149446 [details] [review] Bug 33426: Add DataTables saveState to suggestion.tt To test: 1. In the staff client, go to Purchase Suggestion management page and add a suggestion if needed to make the table display. 2. Make some changes to the table settings (hide/show columns, change sort column, and/or change number of rows to display) 3. Navigate to a different page. 4. Navigate back to Purchase Suggestions page. Note that the table settings have been reset. 5. Apply patch and restart_all 6. Repeat steps 1-4. Note that this time the changes to the table settings were preserved. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Going straight for QA on this one.. it works perfectly as designed.. it's the design of the original bug I dissagree with ;P Making my bug depend on both so we can keep Emily's contribution recorded :)
Thanks Martin! :) I agree that generalizing it is a better approach - working on testing yours now!
Created attachment 149973 [details] [review] Bug 33426: Add DataTables saveState to suggestion.tt To test: 1. In the staff client, go to Purchase Suggestion management page and add a suggestion if needed to make the table display. 2. Make some changes to the table settings (hide/show columns, change sort column, and/or change number of rows to display) 3. Navigate to a different page. 4. Navigate back to Purchase Suggestions page. Note that the table settings have been reset. 5. Apply patch and restart_all 6. Repeat steps 1-4. Note that this time the changes to the table settings were preserved. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Pushed to master for 23.11. Nice work everyone, thanks!
Enhancement not pushed to 23.05.x
Needs nice release notes
I don't think there is anything to document here. Feel free to reopen with more details if needed.