Bug 6487

Summary: No error explanation if patron expiration date is missing
Product: Koha Reporter: Nicole C. Engard <nengard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: normal    
Priority: PATCH-Sent (DO NOT USE) CC: chris
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: cant check out
Proposed fix

Description Nicole C. Engard 2011-06-09 12:05:53 UTC
Created attachment 4436 [details]
cant check out

See attached. The error says 'can't check out' but doesn't say why. In my screen shot it was because of a missing expiration date, but how would I know that without first poking all over the place (which I did have to do).

Nicole
Comment 1 Owen Leonard 2011-06-09 14:26:56 UTC
Created attachment 4437 [details] [review]
Proposed fix

The script tries to parse the patron expiration date without
checking that it is a valid date. If expiration date is empty
it doesn't get caught along with past expiration dates.

I wonder if this line was supposed to catch this problem:

Line 233: if ( $warning_year*$warning_month*$warning_day==0

This patch adds "!$borrower->{'dateexpiry'} ||" to that line.

To test, modify a patron record in mysql to give it a null expiration date. When you try to check out to that patron you should see an error message:

"Cannot check out!

    * Expiration: Patron's card has expired. Renew or Edit Details"
Comment 2 Chris Cormack 2011-06-09 22:54:54 UTC
Simple to test fix, pushed please test on master