Bugzilla – Attachment 173471 Details for
Bug 33484
Ability to remember user's selected table configuration and search filters for tables
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33484: Fix TablesSettings.t
Bug-33484-Fix-TablesSettingst.patch (text/plain), 5.77 KB, created by
Jonathan Druart
on 2024-10-28 09:46:01 UTC
(
hide
)
Description:
Bug 33484: Fix TablesSettings.t
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-10-28 09:46:01 UTC
Size:
5.77 KB
patch
obsolete
>From dec16eb8a3bfd14298a02ebd71013a6399000796 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 17 Oct 2024 09:39:24 +0200 >Subject: [PATCH] Bug 33484: Fix TablesSettings.t > >Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Utils/DataTables/TablesSettings.pm | 2 +- > t/db_dependent/TablesSettings.t | 46 +++++++++++++-------------- > 2 files changed, 24 insertions(+), 24 deletions(-) > >diff --git a/C4/Utils/DataTables/TablesSettings.pm b/C4/Utils/DataTables/TablesSettings.pm >index 4765c7f2025..af35c490396 100644 >--- a/C4/Utils/DataTables/TablesSettings.pm >+++ b/C4/Utils/DataTables/TablesSettings.pm >@@ -89,7 +89,7 @@ sub get_columns { > > Returns the settings for a given table. > >-The settings are default_display_length and default_sort_order. >+The settings are default_display_length, default_sort_order, default_save_state and default_save_state_search. > > =cut > >diff --git a/t/db_dependent/TablesSettings.t b/t/db_dependent/TablesSettings.t >index ab7593ba1f5..4113cbde26b 100755 >--- a/t/db_dependent/TablesSettings.t >+++ b/t/db_dependent/TablesSettings.t >@@ -23,10 +23,11 @@ $module->mock( > admin => { > currency => { > 'currencies-table' => { >- default_display_length => 20, >- default_sort_order => 1, >- default_save_state => 1, >- columns => [ >+ default_display_length => 20, >+ default_sort_order => 1, >+ default_save_state => 1, >+ default_save_state_search => 0, >+ columns => [ > { > columnname => 'currency', > cannot_be_toggled => '1', >@@ -37,24 +38,16 @@ $module->mock( > cannot_be_toggled => '1', > cannot_be_modified => '1' > }, >- { >- columnname => 'symbol' >- }, >+ { columnname => 'symbol' }, > { > is_hidden => '1', > columnname => 'iso_code' > }, >- { >- columnname => 'last_updated' >- }, >- { >- columnname => 'active' >- }, >- { >- columnname => 'actions' >- } >+ { columnname => 'last_updated' }, >+ { columnname => 'active' }, >+ { columnname => 'actions' } > ] >- } >+ } > } > }, > } >@@ -127,6 +120,7 @@ my $modules_expected = { > default_display_length => 20, > default_sort_order => 1, > default_save_state => 1, >+ default_save_state_search => 0, > columns => [ > { > columnname => 'currency', >@@ -183,6 +177,10 @@ for my $m ( keys %$modules ) { > for my $t ( keys %{ $modules->{$m}{$p} } ) { > my $columns = > C4::Utils::DataTables::TablesSettings::get_columns( $m, $p, $t ); >+ # We do not store default_save_state and default_save_state_search in the yml file >+ # Removing them before comparison >+ delete $_->{default_save_state} for @$columns; >+ delete $_->{default_save_state_search} for @$columns; > is_deeply( > $columns, > $modules->{$m}{$p}{$t}{columns}, >@@ -192,14 +190,16 @@ for my $m ( keys %$modules ) { > C4::Utils::DataTables::TablesSettings::get_table_settings( $m, $p, $t ); > is_deeply( > { >- default_display_length => $table_settings->{default_display_length}, >- default_sort_order => $table_settings->{default_sort_order} >- default_save_state => $table_settings->{default_save_state} >+ default_display_length => $table_settings->{default_display_length}, >+ default_sort_order => $table_settings->{default_sort_order}, >+ default_save_state => $table_settings->{default_save_state}, >+ default_save_state_search => $table_settings->{default_save_state_search}, > }, > { >- default_display_length => $modules->{$m}{$p}{$t}{default_display_length}, >- default_sort_order => $modules->{$m}{$p}{$t}{default_sort_order}, >- default_save_state => $modules->{$m}{$p}{$t}{default_save_state}, >+ default_display_length => $modules->{$m}{$p}{$t}{default_display_length}, >+ default_sort_order => $modules->{$m}{$p}{$t}{default_sort_order}, >+ default_save_state => $modules->{$m}{$p}{$t}{default_save_state}, >+ default_save_state_search => $modules->{$m}{$p}{$t}{default_save_state_search}, > } > ); > } >-- >2.34.1
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 33484
:
149444
|
149445
|
149447
|
149448
|
149449
|
149925
|
149926
|
149927
|
149928
|
149929
|
149930
|
149974
|
149975
|
149976
|
149977
|
149978
|
149979
|
173443
|
173444
|
173445
|
173446
|
173447
|
173448
|
173449
|
173450
|
173451
|
173452
|
173453
|
173454
|
173455
|
173456
|
173457
|
173458
|
173459
|
173460
|
173461
|
173462
|
173463
|
173464
|
173465
|
173466
|
173467
|
173468
|
173469
|
173470
| 173471 |
173472
|
173473
|
173474
|
173475
|
173476
|
173477
|
173478
|
173479
|
173480
|
173481
|
173482
|
173483
|
173484
|
173485
|
173486
|
173546
|
173606
|
173607
|
173985
|
174219