From ab5a9e387005067f726ab32756c274631e4f4f1a Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Tue, 19 Sep 2023 21:33:00 +0000 Subject: [PATCH] Bug 34748: Fix column name in columns configuration for basket table The first column was named basket_number, but it's actually the order_line. To test: * Edit column configuration for acquisition > basket * Make sure to set at least one checkbox for 'basket_number' * Apply patch, run database update * Verify that the first column is now 'order_line', but your settings have been preserved Signed-off-by: David Nind Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi (cherry picked from commit f9f9c3a7faeba4a36e233d867019dad495a09c25) Signed-off-by: Fridolin Somers (cherry picked from commit afcbbb3469cff8f81171e3983a5b37da7a21bbd9) Signed-off-by: Jacob O'Mara --- admin/columns_settings.yml | 2 +- .../bug_34748_column_config_error.pl | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100755 installer/data/mysql/atomicupdate/bug_34748_column_config_error.pl diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index 2a0bfce60d..832790d479 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -118,7 +118,7 @@ modules: default_sort_order: 0 columns: - - columnname: basket_number + columnname: order_line - columnname: order_information - diff --git a/installer/data/mysql/atomicupdate/bug_34748_column_config_error.pl b/installer/data/mysql/atomicupdate/bug_34748_column_config_error.pl new file mode 100755 index 0000000000..6d855f43d5 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_34748_column_config_error.pl @@ -0,0 +1,17 @@ +use Modern::Perl; + +return { + bug_number => "34748", + description => "Fix column name in column configuration for basket summary", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + # Do you stuffs here + $dbh->do( + q{UPDATE columns_settings SET columnname="order_line" WHERE columnname="basket_number" AND module="acqui" AND page="basket" and tablename="orders"} + ); + + say $out "Update column configuration with new columnname order_line"; + }, +}; -- 2.39.5