Bugzilla – Attachment 113702 Details for
Bug 26940
debarred comment in borrowers table is lost on patron modifications in memberentry.pl page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26940: Put in sync borrowers.debarredcomment with comments from borrower_debarment
Bug-26940-Put-in-sync-borrowersdebarredcomment-wit.patch (text/plain), 1.53 KB, created by
Jonathan Druart
on 2020-11-17 11:19:26 UTC
(
hide
)
Description:
Bug 26940: Put in sync borrowers.debarredcomment with comments from borrower_debarment
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-11-17 11:19:26 UTC
Size:
1.53 KB
patch
obsolete
>From bae8904ba11dd86b1c9cd2cb02b771c97034c9bd Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 17 Nov 2020 12:18:48 +0100 >Subject: [PATCH] Bug 26940: Put in sync borrowers.debarredcomment with > comments from borrower_debarment > >--- > .../data/mysql/atomicupdate/bug_26940.perl | 22 +++++++++++++++++++ > 1 file changed, 22 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_26940.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_26940.perl b/installer/data/mysql/atomicupdate/bug_26940.perl >new file mode 100644 >index 0000000000..a58d14a5e7 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_26940.perl >@@ -0,0 +1,22 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ my $debar = $dbh->selectall_arrayref(q| >+ SELECT d.borrowernumber, GROUP_CONCAT(comment SEPARATOR '\n') AS comment >+ FROM borrower_debarments d >+ LEFT JOIN borrowers b ON b.borrowernumber=d.borrowernumber >+ WHERE b.debarredcomment IS NULL AND ( expiration > CURRENT_DATE() OR expiration IS NULL ) >+ GROUP BY d.borrowernumber >+ |, { Slice => {} }); >+ >+ >+ my $update_sth = $dbh->prepare(q| >+ UPDATE borrowers >+ SET debarredcomment=? >+ WHERE borrowernumber=? >+ |); >+ for my $d ( @$debar ) { >+ $update_sth->execute($d->{comment}, $d->{borrowernumber}); >+ } >+ >+ NewVersion( $DBversion, 26940, "Put in sync borrowers.debarredcomment with comments from borrower_debarments"); >+} >-- >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 26940
:
113119
|
113123
|
113653
|
113702
|
113779
|
118500
|
118501
|
118502
|
119778
|
119779
|
119780