Bug 9329

Summary: Wrong message for already expired cards
Product: Koha Reporter: Adrien SAURAT <adrien.saurat>
Component: OPACAssignee: Adrien SAURAT <adrien.saurat>
Status: CLOSED FIXED QA Contact: Jonathan Druart <jonathan.druart>
Severity: minor    
Priority: P5 - low CC: chris, jonathan.druart
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: proposed patch
[SIGNED-OFF] Bug 9329: Wrong message for already expired cards
Bug 9329: Wrong message for already expired cards

Description Adrien SAURAT 2012-12-28 15:04:54 UTC
When a library uses the NotifyBorrowerDeparture to give warning about expiration dates, the warning stay the same even "after" the actual expiration.

For a borrower connecting now, in December 2012, the OPAC display this king of message :
"Please note: Your card will expire on 20/08/2012. Please contact the library for more information."

In this case, a new message should be added.
When the card has expired, the message should be simply :
"Please note: Your car has expired. Please contact the library for more information."
Comment 1 Adrien SAURAT 2012-12-28 15:43:59 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2012-12-28 16:14:57 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2013-02-08 11:25:18 UTC
QA comment:

Simple patch, it adds a new message at the OPAC if the borrower's card is nearly expired (depending on the NotifyBorrowerDeparture syspref).

Works as expected.

Marked as Passed QA.
Comment 4 Jonathan Druart 2013-02-08 11:25:41 UTC
Created attachment 15159 [details] [review]
Bug 9329: Wrong message for already expired cards

Previously users would see the same message whether their card was about
to expire or was already expired. This patch adds a new message to
handle cards which are about to expire, following the
NotifyBorrowerDeparture system preference.

TEST PLAN :

The best way to test would to have at the same time :
- a SQL client to change the expiry date of a borrower
- an OPAC session opened for the same patron.

Case 1: expiry date is set in the future
-> no warning

Case 2: expiry date is set in the near future (within the
"NotifyBorrowerDeparture" system preference range)
-> a warning says the card will expire on **date**

Case 3: expiry date is set in the past
-> before patch, same warning as Case 2
-> after patch, new warning indicating that the card has expired

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Added description to the patch and copied test plan from the bug report.
Patch passes test plan.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 5 Jared Camins-Esakov 2013-02-08 14:07:40 UTC
This patch has been pushed to master.
Comment 6 Chris Cormack 2013-02-09 00:23:48 UTC
Pushed to 3.10.x and 3.8.x will be in 3.10.3 and 3.8.10