Bug 38658

Summary: SIP not marking patrons expired unless NotifyBorrowerDeparture has a positive value
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: SIP2Assignee: Matthias Meusburger <matthias.meusburger>
Status: Pushed to main --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low    
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:
25.05.00
Circulation function:
Bug Depends on: 25813    
Bug Blocks:    
Attachments: Bug 38658: Display message for expired patrons in SIP when NotifyBorrowerDeparture is disabled
Bug 38658: Display message for expired patrons in SIP when NotifyBorrowerDeparture is disabled
Bug 38658: Display message for expired patrons in SIP when NotifyBorrowerDeparture is disabled

Description Nick Clemens (kidclamp) 2024-12-09 19:45:52 UTC
Bug 25813 changed the way that SIP reports patron expiry. 

Prior to this bug patrons could eb marked as expired without setting this pref, now it requires a value.

To recreate:
0 - Set NotifyBorrowerDeparture to 30
1 - Set a patron's expiry date to be in the past, I used Edna Acosta
2 - perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -t CR --patron 23529001000463 -m patron_information
3 - Note you are warned patron is expired
4 - Set NotifyBorrowerDeparture to 0
5 - repeat 2
6 - No notice that patron is expired, and patron status does not show any blocks
Comment 1 Matthias Meusburger 2024-12-27 13:54:56 UTC
Created attachment 175954 [details] [review]
Bug 38658: Display message for expired patrons in SIP when NotifyBorrowerDeparture is disabled

This patch restores the behavior that existed in SIP before Bug 25813 - Enhance patron expiration in SIP display:
Always consider an expired patron as expired, even if NotifyBorrowerDeparture is set to 0 (disabled) or unset.

Test plan:

 - Set NotifyBorrowerDeparture to 0

 - Set a patron's expiry date to be in the past

 - Use misc/sip_cli_emulator.pl to display patron information:
   perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -t CR --patron <cardnumber> -m patron_information

 - Check that you have the following message (AF field):
 "Greetings from Koha. Your account has expired as of <expired date>"
Comment 2 Matthias Meusburger 2024-12-27 14:01:50 UTC
Please note that the behavior with NotifyBorrowerDeparture now differs in SIP and at the OPAC, where no warning is displayed to an expired patron when NotifyBorrowerDeparture is disabled or unset.

To be fair, now that you've pointed it, I find it strange that the warning about being expired is not displayed at the OPAC when NotifyBorrowerDeparture is disabled or unset, but that can be the subject of another bug.
Comment 3 Lucas Gass (lukeg) 2025-01-02 17:51:42 UTC
Created attachment 176099 [details] [review]
Bug 38658: Display message for expired patrons in SIP when NotifyBorrowerDeparture is disabled

This patch restores the behavior that existed in SIP before Bug 25813 - Enhance patron expiration in SIP display:
Always consider an expired patron as expired, even if NotifyBorrowerDeparture is set to 0 (disabled) or unset.

Test plan:

 - Set NotifyBorrowerDeparture to 0

 - Set a patron's expiry date to be in the past

 - Use misc/sip_cli_emulator.pl to display patron information:
   perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -t CR --patron <cardnumber> -m patron_information

 - Check that you have the following message (AF field):
 "Greetings from Koha. Your account has expired as of <expired date>"

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 4 Nick Clemens (kidclamp) 2025-02-14 16:27:49 UTC
Created attachment 178103 [details] [review]
Bug 38658: Display message for expired patrons in SIP when NotifyBorrowerDeparture is disabled

This patch restores the behavior that existed in SIP before Bug 25813 - Enhance patron expiration in SIP display:
Always consider an expired patron as expired, even if NotifyBorrowerDeparture is set to 0 (disabled) or unset.

Test plan:

 - Set NotifyBorrowerDeparture to 0

 - Set a patron's expiry date to be in the past

 - Use misc/sip_cli_emulator.pl to display patron information:
   perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -t CR --patron <cardnumber> -m patron_information

 - Check that you have the following message (AF field):
 "Greetings from Koha. Your account has expired as of <expired date>"

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 5 Katrin Fischer 2025-02-21 15:36:27 UTC
Should this be a bug fix instead of an enhancement?
Comment 6 Katrin Fischer 2025-02-21 15:44:39 UTC
Pushed for 25.05!

Well done everyone, thank you!
Comment 7 Matthias Meusburger 2025-02-21 15:45:23 UTC
Hi Katrin,

Yes, this is a bugfix. I've set it to "normal".