From 07fc7c02f261f699e5e70fe45e0fcbc7bbebe346 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 26 Nov 2021 07:53:44 +0000 Subject: [PATCH] Bug 29457: (QA follow-up) Warn number of missing manager_id's No sense in trying to match userid's with borrowernumbers. In 99% of the cases (at least) we will find just NULLs. We could print the number we found. Signed-off-by: Marcel de Rooy Signed-off-by: Martin Renvoize --- installer/data/mysql/atomicupdate/bug_29457.pl | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_29457.pl diff --git a/installer/data/mysql/atomicupdate/bug_29457.pl b/installer/data/mysql/atomicupdate/bug_29457.pl new file mode 100755 index 0000000000..732c919fbd --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_29457.pl @@ -0,0 +1,12 @@ +use Modern::Perl; + +return { + bug_number => "29457", + description => "Warn about missing manager_id in cancelled account lines", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + my ( $count ) = $dbh->selectrow_array( q{SELECT COUNT(*) FROM accountlines WHERE credit_type_code = 'CANCELLATION' AND manager_id is NULL} ); + say "Note: We counted $count cancellations in accountlines with an empty manager_id. We regret that this information is missing, but it can't hurt. This release fixed the bug causing it." if $count; + }, +} -- 2.20.1