Summary: | No error explanation if patron expiration date is missing | ||
---|---|---|---|
Product: | Koha | Reporter: | Nicole C. Engard <nengard> |
Component: | Templates | Assignee: | 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 |
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" Simple to test fix, pushed please test on master |
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