Bug 36819: (QA follow-up) Improve update output

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Martin Renvoize 2024-05-21 16:17:36 +01:00 committed by Katrin Fischer
parent 83095ebc4e
commit 142a5ba2a7
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 8 additions and 3 deletions

View File

@ -8,9 +8,14 @@ return {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
$dbh->do(q{UPDATE creator_layouts SET scale_width = '0.800000' WHERE scale_width = '0.080000';});
say $out "Changed the barcode width in patron card creator default layout to 80% if it was 8%";
my $affected = $dbh->do(q{UPDATE creator_layouts SET scale_width = '0.800000' WHERE scale_width = '0.080000';});
if ($affected) {
say_warning(
$out, "Changed the barcode width in patron card creator default layout from 8% to 80%";
);
} else {
say_info( $out, "No patron card creator layouts found with 8% width, no changes required" );
}
},
};