Bugzilla – Attachment 173908 Details for
Bug 36822
When creating a new patron via LDAP or Shibboleth 0000-00-00 is inserted for invalid updated_on
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36822: atomicupdate
Bug-36822-atomicupdate.patch (text/plain), 1.48 KB, created by
Pedro Amorim
on 2024-11-04 11:34:54 UTC
(
hide
)
Description:
Bug 36822: atomicupdate
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-11-04 11:34:54 UTC
Size:
1.48 KB
patch
obsolete
>From 14ad5860c9be002cf8aadca6d4ebbc0903e5ad1e Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Tue, 29 Oct 2024 13:14:54 +0000 >Subject: [PATCH] Bug 36822: atomicupdate > >Fix any existing updated_on issues >--- > .../data/mysql/atomicupdate/bug_36822.pl | 28 +++++++++++++++++++ > 1 file changed, 28 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_36822.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_36822.pl b/installer/data/mysql/atomicupdate/bug_36822.pl >new file mode 100755 >index 0000000000..a6527d8eca >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_36822.pl >@@ -0,0 +1,28 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_failure say_success say_info); >+ >+return { >+ bug_number => "36822", >+ description => "Sanitize borrowers.updated_on", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ my $sth = $dbh->prepare( >+ q{ >+ SELECT borrowernumber >+ FROM borrowers >+ WHERE updated_on = '0000-00-00 00:00:00' >+ } >+ ); >+ $sth->execute; >+ my $results = $sth->fetchall_arrayref( {} ); >+ >+ if (@$results) { >+ sanitize_zero_date( 'borrowers', 'updated_on' ); >+ say_info( $out, "The following borrowers' updated_on has been sanitized: " >+ . join( ', ', map { $_->{borrowernumber} } @$results ) ); >+ } >+ >+ }, >+}; >-- >2.39.5
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 36822
:
173373
|
173374
|
173375
|
173376
|
173377
|
173385
|
173386
|
173387
|
173388
|
173389
|
173391
|
173392
|
173393
|
173394
|
173395
|
173402
|
173403
|
173404
|
173405
|
173406
|
173646
|
173903
|
173904
|
173905
|
173906
|
173907
| 173908 |
173909
|
174523
|
174525
|
174926
|
174927
|
174965