Bug 33845: Tidy and add update

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Nick Clemens 2023-09-29 13:22:17 +00:00 committed by Tomas Cohen Arazi
parent 4e035ba8ae
commit efe239b57e
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
2 changed files with 48 additions and 32 deletions

View file

@ -0,0 +1,19 @@
use Modern::Perl;
return {
bug_number => "33845",
description => "Update holds_table column settings entries to holds-table",
up => sub {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
$dbh->do(
q{
UPDATE columns_settings SET tablename="holds-table"
WHERE page="circulation" and tablename="holds_table"
}
);
say $out "Update columns settings to use table name holds-table";
},
};

View file

@ -115,17 +115,14 @@ while ( my $h = $holds_rs->next() ) {
priority => $h->priority(),
reservenotes => $h->reservenotes(),
itemtype_limit => $itemtype_limit,
reservedate_formatted => $h->reservedate() ? output_pref(
{ dt => dt_from_string( $h->reservedate() ), dateonly => 1 }
)
reservedate_formatted => $h->reservedate()
? output_pref( { dt => dt_from_string( $h->reservedate() ), dateonly => 1 } )
: q{},
suspend_until_formatted => $h->suspend_until() ? output_pref(
{ dt => dt_from_string( $h->suspend_until() ), dateonly => 1 }
)
suspend_until_formatted => $h->suspend_until()
? output_pref( { dt => dt_from_string( $h->suspend_until() ), dateonly => 1 } )
: q{},
expirationdate_formatted => $h->expirationdate() ? output_pref(
{ dt => dt_from_string( $h->expirationdate() ), dateonly => 1 }
)
expirationdate_formatted => $h->expirationdate()
? output_pref( { dt => dt_from_string( $h->expirationdate() ), dateonly => 1 } )
: q{},
};