Bugzilla – Attachment 174786 Details for
Bug 38482
Disable save state for items tables
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38482: Remove save state for the holdings tables
Bug-38482-Remove-save-state-for-the-holdings-table.patch (text/plain), 3.96 KB, created by
Philip Orr
on 2024-11-19 11:59:56 UTC
(
hide
)
Description:
Bug 38482: Remove save state for the holdings tables
Filename:
MIME Type:
Creator:
Philip Orr
Created:
2024-11-19 11:59:56 UTC
Size:
3.96 KB
patch
obsolete
>From 968175163b2b76cfd7de0fcaa403019592555899 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 19 Nov 2024 10:25:06 +0100 >Subject: [PATCH] Bug 38482: Remove save state for the holdings tables > >On the holdings table of the bibliographic record detail page, we have a special >behaviour: we hide columns if there is no data to display. Indeed we have a lot >of column and we want to limit the number of columns displayed. > >This behaviour conflicts with "Save state": when the columns are hidden the >state is modified. If you leave the page and come back, the column will stay >hidden, even if the global settings does not have it as hidden and even if the >user didn't explicitly hide it. > >We want to implement something correctly to prevent a conflict with those 2 >behaviours, but 24.11.00 is coming and we need a quick fix: here we are going to >remove save state for these 2 tables. > >Test plan: >Apply this patch, restart_all >Go to the tables settings admin, jump to holdings_table >Notice that "Save configuration state on page change" is turned off by default >Go to catalogue/detail.plbiblionumber=13 (item does not have call number) >=> "Call number" column is not displayed >Edit the item, set a call number >Go to catalogue/detail.plbiblionumber=13 (item has call number) >=> "Call number" column is displayed > >Go to the tables settings admin, jump to holdings_table >Turn on "Save configuration state on page change" >Go to catalogue/detail.plbiblionumber=1 (item does not have call number) >=> "Call number" column is not displayed >Edit the item, set a call number >Go to catalogue/detail.plbiblionumber=13 (item does not have call number) >=> "Call number" column is still not displayed > >This can be considered a bug, that why we are disabling the feature for this >table. > >Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> >Signed-off-by: PhilipOrr <philip.orr@lmscloud.de> >--- > C4/Utils/DataTables/TablesSettings.pm | 13 +++++++++---- > admin/columns_settings.yml | 2 ++ > 2 files changed, 11 insertions(+), 4 deletions(-) > >diff --git a/C4/Utils/DataTables/TablesSettings.pm b/C4/Utils/DataTables/TablesSettings.pm >index 0d2f87f39e..40fe890160 100644 >--- a/C4/Utils/DataTables/TablesSettings.pm >+++ b/C4/Utils/DataTables/TablesSettings.pm >@@ -101,19 +101,24 @@ sub get_table_settings { > } > )->next; > >+ my $table_settings = $list->{modules}->{$module}->{$page}->{$tablename}; > return { > default_display_length => $rs > ? $rs->default_display_length >- : $list->{modules}{$module}{$page}{$tablename}{default_display_length}, >+ : $table_settings->{default_display_length}, > default_sort_order => $rs > ? $rs->default_sort_order >- : $list->{modules}{$module}{$page}{$tablename}{default_sort_order}, >+ : $table_settings->{default_sort_order}, > default_save_state => $rs > ? $rs->default_save_state >- : 1, >+ : exists $table_settings->{default_save_state} >+ ? $table_settings->{default_save_state} >+ : 1, > default_save_state_search => $rs > ? $rs->default_save_state_search >- : $list->{modules}{$module}{$page}{$tablename}{default_save_state_search}, >+ : exists $table_settings->{default_save_state_search} >+ ? $table_settings->{default_save_state_search} >+ : 0, > }; > } > >diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml >index 815fcee119..cf3beff558 100644 >--- a/admin/columns_settings.yml >+++ b/admin/columns_settings.yml >@@ -420,6 +420,7 @@ modules: > detail: > holdings_table: > default_display_length: 20 >+ default_save_state: 0 > columns: > - > columnname: checkbox >@@ -490,6 +491,7 @@ modules: > > otherholdings_table: > default_display_length: 20 >+ default_save_state: 0 > columns: > - > columnname: checkbox >-- >2.39.2
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 38482
:
174764
|
174784
|
174785
| 174786 |
174791