From f9f9c3a7faeba4a36e233d867019dad495a09c25 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 --- 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 90fb535472..e528b76298 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