Bugzilla – Attachment 186238 Details for
Bug 39930
Saved configuration states on tables are lost overnight
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39930: Prevent DT's state to be lost overnight
Bug-39930-Prevent-DTs-state-to-be-lost-overnight.patch (text/plain), 1.99 KB, created by
Nick Clemens (kidclamp)
on 2025-09-05 16:03:20 UTC
(
hide
)
Description:
Bug 39930: Prevent DT's state to be lost overnight
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2025-09-05 16:03:20 UTC
Size:
1.99 KB
patch
obsolete
>From 4d33a5c09856cf0556b0d0a38192800111719d92 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 4 Sep 2025 12:51:09 +0200 >Subject: [PATCH] Bug 39930: Prevent DT's state to be lost overnight > >The default value for stateDuration is 7200 (2h). Which means DataTables >will ignore the saved state if reused after this delay. > >Additionally is causes problem on some tables where the default state is >not restored and all columns are displayed. > >From https://datatables.net/reference/option/stateDuration >``` >Please note that the value is given in seconds. The value 0 is a special value as it indicates that the state can be stored and retrieved indefinitely with no time limit. >``` > >We are going to set it to 0 so that the state is only lost/reset after a >logout > >Test plan: >Ideally you can should edit this file and set saveState to 60 (seconds), >so it's easy to test. >Do not apply this patch and confirm that the state is not restored after >either 60s or 2h (if you modified the file or not). >It is a problem on the checkout list table as extra columns (like >"Today's checkouts") are displayed. > >With this patch applied the state should be restored correctly. >If you logout the state will be lost however. > >Ideally we might want to store user's preferences on the server. > >Signed-off-by: Ludovic Julien <ludovic.julien@inLibro.com> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > koha-tmpl/intranet-tmpl/prog/js/datatables.js | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >index 28d1cf5eee8..dfa8e93af03 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >@@ -1270,6 +1270,7 @@ function _dt_save_restore_state(table_settings, external_filter_nodes = {}) { > > return { > stateSave: true, >+ stateDuration: 0, > stateSaveCallback, > stateLoadCallback, > stateSaveParams, >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39930
:
184625
|
186139
|
186182
| 186238