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: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 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/

_______________________________________________
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/

Reply via email to