Bug 41316

Summary: Using patron-homelibrary option for overdue notices does not change which rules are used
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: Command-line UtilitiesAssignee: Nick Clemens (kidclamp) <nick>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: andrew, clackman, robin
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 41315    
Bug Blocks:    
Attachments: Bug 41316: Use patrons homelibrary for selecting overdues that should be sent
Bug 41316: Use patrons homelibrary for selecting overdues that should be sent

Description Nick Clemens (kidclamp) 2025-11-26 16:23:43 UTC
Bug 32740 added an option to send overdue notices from the patrons home library, saying:
When it's selected notification messages for overdues will be bundled and sent from the borrowing user's home library

However, the other two options 'item homelibrary' and 'checkout library' also change which set of triggers are used.

Currently the patron option will continue to use the triggers of the checkout library

This is confusing
Comment 1 Nick Clemens (kidclamp) 2025-11-26 16:44:46 UTC
Created attachment 189969 [details] [review]
Bug 41316: Use patrons homelibrary for selecting overdues that should be sent

Currently the patron homelibrary option for OverdueNoticeFrom will select overdues for a branches triggers
based on the issuing branch

The other two options select the trigger/overdues based on the selection

This patch alters the selection of overdues to match only for the patrons branch

To test:
1 - Apply 41315 and follow the plan there
2 - Apply this bug and run the overdues script, assuming CPL is branch A:
    perl misc/cronjobs/overdue_notices.pl --triggered --library CPL --test --nomail -v -v
3 - No overdues should be triggered
4 - Run the script for one of the patrons home libraries, in my case MPL
    perl misc/cronjobs/overdue_notices.pl --triggered --library MPL --test --nomail -v -v
5 - Note only overdues for patrons from that branch are triggered
Comment 2 Andrew Fuerste-Henry 2026-01-06 19:14:34 UTC
Created attachment 190953 [details] [review]
Bug 41316: Use patrons homelibrary for selecting overdues that should be sent

Currently the patron homelibrary option for OverdueNoticeFrom will select overdues for a branches triggers
based on the issuing branch

The other two options select the trigger/overdues based on the selection

This patch alters the selection of overdues to match only for the patrons branch

To test:
1 - Apply 41315 and follow the plan there
2 - Apply this bug and run the overdues script, assuming CPL is branch A:
    perl misc/cronjobs/overdue_notices.pl --triggered --library CPL --test --nomail -v -v
3 - No overdues should be triggered
4 - Run the script for one of the patrons home libraries, in my case MPL
    perl misc/cronjobs/overdue_notices.pl --triggered --library MPL --test --nomail -v -v
5 - Note only overdues for patrons from that branch are triggered

Signed-off-by: Ben Daeuber <bdaeuber@fargolibrary.org>