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 <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Katrin Fischer 2023-09-19 21:33:00 +00:00 committed by Tomas Cohen Arazi
parent 82234aba24
commit f9f9c3a7fa
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
2 changed files with 18 additions and 1 deletions

View file

@ -118,7 +118,7 @@ modules:
default_sort_order: 0
columns:
-
columnname: basket_number
columnname: order_line
-
columnname: order_information
-

View file

@ -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";
},
};