<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Jonathan,<br>
We have a number of old installations. They are all running 17.05
today.<br>
<br>
I checked about eight DBs and found only one record with dateexpiry
= "0000-00-00". The record was created in 2012.<br>
<br>
Bob<br>
<br>
<div class="moz-cite-prefix">On 14/02/18 06:06, Jonathan Druart
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAJzKNY6MjUqN6ME4haFHVRQsMGck1X2zD5yVSfNCQaG9TzEjcA@mail.gmail.com">
<div dir="ltr">
<div>
<div>
<div>
<div>
<div><span class="inbox-inbox-label">"Enrollment period"
is mandatory when creating/updating a patron
category, dateexpiry will be calculated when a
patron is created.<br>
</span></div>
<span class="inbox-inbox-label">So, at least with new
versions, this field should never be set to 0000-00-00
(at least using the interface).<br>
</span></div>
<span class="inbox-inbox-label">We will need to take a
decision at some point, either update these values with
9999-12-31 or recalculate them.<br>
<br>
</span></div>
<span class="inbox-inbox-label">It would be useful to know
the return of<br>
SELECT COUNT(*) FROM borrowers where
dateexpiry="0000-00-00"<br>
on old installations.<br>
<br>
</span></div>
<span class="inbox-inbox-label">Cheers,<br>
</span></div>
<span class="inbox-inbox-label">Jonathan<br>
</span></div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Tue, 6 Feb 2018 at 18:37 Katrin Fischer <<a
href="mailto:katrin.fischer.83@web.de"
moz-do-not-send="true">katrin.fischer.83@web.de</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>Hm, I don't remember a special use case for 0000-00-00. <br>
</p>
<p>My impression was that it is impossible to have a patron
without a valid dateexpiry date.<br>
</p>
</div>
<div text="#000000" bgcolor="#FFFFFF">
<div class="m_-1256743904896149807moz-cite-prefix">On <a
href="tel:06%2002%2020%2018%2017" value="+33602201817"
target="_blank" moz-do-not-send="true">06.02.2018 17</a>:10,
Jonathan Druart wrote:<br>
</div>
</div>
<div text="#000000" bgcolor="#FFFFFF">
<blockquote type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>Hi devs,<br>
<br>
</div>
I have just caught that:<br>
<br>
</div>
Koha::Patron->is_expired returns 0 if
$self->dateexpiry eq '0000-00-00'<br>
</div>
And there is a test I wrote for it on bug 17578
(commit 5a0a2ce584dec74808f471b0f92b2114c3d6029e ,
GetMemberDetails - Remove is_expired)<br>
</div>
<div><br>
</div>
<div>But then we also have, in
C4::Circulation::CanBookBeIssued:<br>
752 if ( !defined $patron->dateexpiry ||
$patron->dateexpiry eq '0000-00-00') {<br>
753 $issuingimpossible{EXPIRED} = 1;<br>
754 } else {<br>
</div>
<div>With a test:<br>
is( $issuingimpossible->{EXPIRED}, 1, 'The patron
should be considered as expired if dateexpiry is
0000-00-00' );<br>
<br>
</div>
<div>So, my questions, do you have a very old Koha
installations to search if there is
borrowers.is_expired == "0000-00-00" in it?<br>
</div>
<div>Do you remember if it meant expired or not at some
point?<br>
<br>
</div>
<div>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.<br>
<br>
</div>
<div>Cheers,<br>
</div>
<div>Jonathan<br>
</div>
<div><br>
</div>
<div>(yes, the same code should be used)<br>
</div>
</div>
<br>
<fieldset
class="m_-1256743904896149807mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
</div>
<div text="#000000" bgcolor="#FFFFFF">
<blockquote type="cite">
<pre>_______________________________________________
Koha-devel mailing list
<a class="m_-1256743904896149807moz-txt-link-abbreviated" href="mailto:Koha-devel@lists.koha-community.org" target="_blank" moz-do-not-send="true">Koha-devel@lists.koha-community.org</a>
<a class="m_-1256743904896149807moz-txt-link-freetext" href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" target="_blank" moz-do-not-send="true">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a>
website : <a class="m_-1256743904896149807moz-txt-link-freetext" href="http://www.koha-community.org/" target="_blank" moz-do-not-send="true">http://www.koha-community.org/</a>
git : <a class="m_-1256743904896149807moz-txt-link-freetext" href="http://git.koha-community.org/" target="_blank" moz-do-not-send="true">http://git.koha-community.org/</a>
bugs : <a class="m_-1256743904896149807moz-txt-link-freetext" href="http://bugs.koha-community.org/" target="_blank" moz-do-not-send="true">http://bugs.koha-community.org/</a></pre>
</blockquote>
<br>
</div>
_______________________________________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org"
target="_blank" moz-do-not-send="true">Koha-devel@lists.koha-community.org</a><br>
<a
href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
website : <a href="http://www.koha-community.org/"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://bugs.koha-community.org/</a></blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Koha-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Koha-devel@lists.koha-community.org">Koha-devel@lists.koha-community.org</a>
<a class="moz-txt-link-freetext" href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a>
website : <a class="moz-txt-link-freetext" href="http://www.koha-community.org/">http://www.koha-community.org/</a>
git : <a class="moz-txt-link-freetext" href="http://git.koha-community.org/">http://git.koha-community.org/</a>
bugs : <a class="moz-txt-link-freetext" href="http://bugs.koha-community.org/">http://bugs.koha-community.org/</a></pre>
</blockquote>
<br>
</body>
</html>