Bug 12633 introduced a bug, that where debarred is blank, the column is being filled with 0000-00-00 You can test this by importing a patron using the import tool, the patron must have no debarred date set. Then check in the DB and you will notice it has an invalid date 0000-00-00 This in turn makes Koha error in circulation as we try to truncate and invalid date object. Adding $data{'debarred'} = undef if( not $data{'debarred'} ); to the AddMembers subroutine should fix this issue.
Created attachment 41871 [details] [review] 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
Ohh look an easily testable patch that fixes a major bug .. just waiting for Global bug squash day :)
I tested this during GBSD together with Kyle. And the patch works!
Created attachment 42331 [details] [review] [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>
Created attachment 42342 [details] [review] 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> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 42343 [details] [review] Bug 14717: Prevent 0000-00-00 on updating a patron Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 42344 [details] [review] Bug 14171: Update borrowers date fields Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
I think we should go further here. Can I get a QA on the new patches?
Created attachment 42356 [details] [review] [PASSED QA] 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> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 42357 [details] [review] [PASSED QA] Bug 14717: Prevent 0000-00-00 on updating a patron Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 42358 [details] [review] [PASSED QA] Bug 14171: Update borrowers date fields Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> http://bugs.koha-community.org/show_bug.cgi?id=14717 Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Patches pushed to master. Good catch Chris!
Pushed to 3.20.x will be in 3.20.4