Bugzilla – Attachment 42331 Details for
Bug 14717
Prevent 0000-00-00 dates in patron data
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 14717: Invalid dates in debarred column
SIGNED-OFF-Bug-14717-Invalid-dates-in-debarred-col.patch (text/plain), 1.31 KB, created by
Kyle M Hall (khall)
on 2015-09-03 14:36:32 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 14717: Invalid dates in debarred column
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-09-03 14:36:32 UTC
Size:
1.31 KB
patch
obsolete
>From 44fe9f203955dfc190b81ac31124446c8ac6336a Mon Sep 17 00:00:00 2001 >From: Chris Cormack <chrisc@catalyst.net.nz> >Date: Tue, 25 Aug 2015 10:00:20 +1200 >Subject: [PATCH] [SIGNED-OFF] Bug 14717: Invalid dates in debarred column > >To test >1/ Import a patron using the patron import tool, make sure they have >no debarred column in the file >2/ Check the database, notice the debarred column is 0000-00-00 >3/ For bonus points, checkout an item to that borrower, then check it in >notice Koha errors >4/ Apply patch >5/ Import a new patron >6/ Notice column is now NULL and that checkins work > >Signed-off-by: Eugene Espinoza <eugenegf@yahoo.com> >--- > C4/Members.pm | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > >diff --git a/C4/Members.pm b/C4/Members.pm >index 91c89f8..0f4aeba 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -759,7 +759,10 @@ sub AddMember { > > # create a disabled account if no password provided > $data{'password'} = ($data{'password'})? hash_password($data{'password'}) : '!'; >+ >+ # we don't want invalid dates in the db (mysql has a bad habit of inserting 0000-00-00 > $data{'dateofbirth'} = undef if( not $data{'dateofbirth'} ); >+ $data{'debarred'} = undef if ( not $data{'debarred'} ); > > # get only the columns of Borrower > my @columns = $schema->source('Borrower')->columns; >-- >1.7.2.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 14717
:
41871
|
42331
|
42342
|
42343
|
42344
|
42356
|
42357
|
42358