From 57dab88f0335cf03121117b52d953c3108d11bda Mon Sep 17 00:00:00 2001 From: Emmi Takkinen Date: Thu, 21 Apr 2022 09:27:17 +0300 Subject: [PATCH] Bug 29092: Add timestamp to account-fines table column settings Table settings for the account_fines table (in the Patrons section, the "Transactions" table in a patron account) are missing a checkbox for the "Updated On" column. Because of this, one cannot hide the Updated On column and any other values one sets here get applied to the wrong columns. This patch adds timestamp to account-fines column settings. To test: 1) Navigate to columns settings page and modify account-fines tables column. => Note that if you hide e.g. account_type column, column credit_number is hidden on patrons account page 2) Apply patch and update database. => Account-fines column settings has now a option to hide timestamp. => Correct columns should now be hidden. Sponsored-by: Koha-Suomi Oy Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Signed-off-by: Fridolin Somers --- admin/columns_settings.yml | 2 ++ installer/data/mysql/atomicupdate/bug_29092.pl | 14 ++++++++++++++ 2 files changed, 16 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_29092.pl diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index e15bcfcb42..bd83299c2c 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -754,6 +754,8 @@ modules: columns: - columnname: date + - + columnname: timestamp - columnname: credit_number is_hidden: 1 diff --git a/installer/data/mysql/atomicupdate/bug_29092.pl b/installer/data/mysql/atomicupdate/bug_29092.pl new file mode 100755 index 0000000000..797271ce6b --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_29092.pl @@ -0,0 +1,14 @@ +use Modern::Perl; + +return { + bug_number => "29092", + description => "Add timestamp to account-fines table column settings", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + # Do you stuffs here + $dbh->do(q{INSERT IGNORE INTO columns_settings (module, page, tablename, columnname, cannot_be_toggled, is_hidden) VALUES ("members", "fines", "account-fines", "timestamp", 0, 0)}); + # Print useful stuff here + say $out "Update is going well so far"; + }, +}; -- 2.39.5