"Enrollment period" is mandatory when creating/updating a patron category, dateexpiry will be calculated when a patron is created. So, at least with new versions, this field should never be set to 0000-00-00 (at least using the interface). We will need to take a decision at some point, either update these values with 9999-12-31 or recalculate them. It would be useful to know the return of SELECT COUNT(*) FROM borrowers where dateexpiry="0000-00-00" on old installations. Cheers, Jonathan On Tue, 6 Feb 2018 at 18:37 Katrin Fischer <katrin.fischer.83@web.de> wrote:
Hm, I don't remember a special use case for 0000-00-00.
My impression was that it is impossible to have a patron without a valid dateexpiry date. On 06.02.2018 17 <06%2002%2020%2018%2017>:10, Jonathan Druart wrote:
Hi devs,
I have just caught that:
Koha::Patron->is_expired returns 0 if $self->dateexpiry eq '0000-00-00' And there is a test I wrote for it on bug 17578 (commit 5a0a2ce584dec74808f471b0f92b2114c3d6029e , GetMemberDetails - Remove is_expired)
But then we also have, in C4::Circulation::CanBookBeIssued: 752 if ( !defined $patron->dateexpiry || $patron->dateexpiry eq '0000-00-00') { 753 $issuingimpossible{EXPIRED} = 1; 754 } else { With a test: is( $issuingimpossible->{EXPIRED}, 1, 'The patron should be considered as expired if dateexpiry is 0000-00-00' );
So, my questions, do you have a very old Koha installations to search if there is borrowers.is_expired == "0000-00-00" in it? Do you remember if it meant expired or not at some point?
I am trying to adapt our code to sql strict modes, and this value is no longer valid, we will need to update existing values.
Cheers, Jonathan
(yes, the same code should be used)
_______________________________________________ Koha-devel mailing listKoha-devel@lists.koha-community.orghttp://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/