Bug 6487 - No error explanation if patron expiration date is missing
Summary: No error explanation if patron expiration date is missing
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: PATCH-Sent (DO NOT USE) normal (vote)
Assignee: Owen Leonard
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-09 12:05 UTC by Nicole C. Engard
Modified: 2013-12-05 20:01 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
cant check out (46.24 KB, image/png)
2011-06-09 12:05 UTC, Nicole C. Engard
Details
Proposed fix (2.98 KB, patch)
2011-06-09 14:26 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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