Bugzilla – Attachment 128032 Details for
Bug 29457
Fee Cancellation records the wrong manager_id
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29457: (follow-up) Add additional information to warnings
Bug-29457-follow-up-Add-additional-information-to-.patch (text/plain), 2.33 KB, created by
Martin Renvoize (ashimema)
on 2021-11-26 10:29:52 UTC
(
hide
)
Description:
Bug 29457: (follow-up) Add additional information to warnings
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-11-26 10:29:52 UTC
Size:
2.33 KB
patch
obsolete
>From 6a89455221c51dbc3bd998802b3d6e0501c1c00a Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 26 Nov 2021 10:28:33 +0000 >Subject: [PATCH] Bug 29457: (follow-up) Add additional information to warnings > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > installer/data/mysql/atomicupdate/bug_29457.pl | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_29457.pl b/installer/data/mysql/atomicupdate/bug_29457.pl >index 732c919fbd..ab792bc4c8 100755 >--- a/installer/data/mysql/atomicupdate/bug_29457.pl >+++ b/installer/data/mysql/atomicupdate/bug_29457.pl >@@ -6,7 +6,15 @@ return { > 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; >+ my ( $count_bad ) = $dbh->selectrow_array( q{SELECT COUNT(*) FROM accountlines WHERE credit_type_code = 'CANCELLATION' AND manager_id IS NOT NULL} ); >+ if ( $count_bad ) { >+ say $out "Warning: We counted $count_bad cancellations in accountlines where the manager_id is likely incorrect."; >+ say $out "Prior to this patch a users 'userid' was being passed into the manager_id field where borrowernumber is expected"; >+ say $out "You may wish to run 'UPDATE accountlines SET manager_id = NULL WHERE credit_type_code = 'CANCELLATION'"; >+ say $out "Alternatively you may wish to run 'UPDATE accountlines SET manager_id = ( SELECT borrowernumber FROM borrowers WHERE borrowers.userid = accountlines.manager_id ) WHERE credit_type_code = 'CANCELLATION''"; >+ } >+ >+ my ( $count_empty ) = $dbh->selectrow_array( q{SELECT COUNT(*) FROM accountlines WHERE credit_type_code = 'CANCELLATION' AND manager_id IS NULL} ); >+ say $out "Note: We counted $count_empty 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_empty; > }, > } >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 29457
:
127527
|
127596
|
127739
|
128024
|
128025
|
128030
|
128031
|
128032
|
128207
|
128208
|
128649
|
128650
|
128651