Bug 41393

Summary: Advance notices should set the reply to address
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: NoticesAssignee: Nick Clemens (kidclamp) <nick>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31281
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:
Attachments: Bug 41393: Set the correct reply to address for advance notices

Description Nick Clemens (kidclamp) 2025-12-05 19:52:48 UTC
Similar to bug 31281, but for the advance notices
Comment 1 Nick Clemens (kidclamp) 2025-12-05 20:13:37 UTC
Created attachment 190254 [details] [review]
Bug 41393: Set the correct reply to address for advance notices

This patch additionally fetches the reply to address for advance notices

To test:
1 - Have some issues that will be due soon for a patron(s)
    Checkout with the due date set to tomorrow
2 - Verify the patron(s) have an email defined, verify the issuing branch has a reply to set
3 - Verify the patron(s) have messaging preference set to receive Advance notices by email 1 day in advance
4 - perl misc/cronjobs/advance_notices.pl -v -c
5 - Check the message queue
    SELECT * FROM message_queue WHERE borrowernumber={##}
6 - Note no rpely to is set
7 - Apply patch
8 - perl misc/cronjobs/advance_notices.pl -v -c
9 - Check the message queue
10 - Confirm newer message has the reply to populated
11 - Ensure the issued item has a different homebranch with a reply to address se
12 - perl misc/cronjobs/advance_notices.pl -v -c --frombranch item-homebranch
13 - Confirm message has correct reply to
14 - Set patron to want digest in messaging preferences
15 - Generate notices
16 - Confirm digets has the right reply to