https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34304

--- Comment #3 from Lari Strand <[email protected]> ---
Created attachment 207166
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207166&action=edit
Bug 34304: New hold reminder using days in advance

This patch replaces cronjob script (holds_reminder.pl) that:
- Prepares hold expiration reminder messages for patrons
- Groups holds by patron and days until expiration for digest delivery
- Respects patron messaging preferences and configured days-in-advance settings
- Supports filtering by library branch
- Provides backward compatibility with default days parameter for patrons
without days-in-advance value set
- Queues messages in the message queue for processing by
process_message_queue.pl

Test plan:

1. Set up a patron with hold reminder preferences
   - Set a days-in-advance preference (e.g., 7 days)
   - Select at least one message transport (email, SMS, etc.)
2. Create test data: Add an expiring hold for the patron that expires in
exactly X days
   (matching the patron's days-in-advance preference)
   - Ensure hold status is 'W' (waiting)
3. Run: ./holds_reminder.pl -c -v -n to preview messages
   - Verify the test hold appears in output
   - Verify message content is correct with hold details
4. Verify correct holds are selected (found='W', within expiration window)
5. Run: ./holds_reminder.pl -c -v to queue actual messages
6. Verify messages appear in message_queue table for the test patron
7. Test library filtering with --library parameter
8. Test default days parameter with -d flag (test with patron without
days_in_advance value stored)
9. Verify patron preferences days_in_advance value override default_days
trigger

Sponsored-by: Koha-Suomi Oy

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to