Bug 36127

Summary: Port default HOLDPLACED and HOLD_CHANGED notices to Template Toolkit syntax
Product: Koha Reporter: Emily Lamancusa (emlam) <emily.lamancusa>
Component: NoticesAssignee: Emily Lamancusa (emlam) <emily.lamancusa>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: marion.durand
Version: MainKeywords: Academy, roadmap_24_05
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on:    
Bug Blocks: 15278    
Attachments: Bug 36127: Adjust default HOLDPLACED and HOLD_CHANGED notices to use TT
Bug 36127: Adjust default HOLDPLACED and HOLD_CHANGED notices to use TT

Description Emily Lamancusa (emlam) 2024-02-16 21:59:33 UTC

    
Comment 1 Emily Lamancusa (emlam) 2024-12-18 13:53:08 UTC
Created attachment 175652 [details] [review]
Bug 36127: Adjust default HOLDPLACED and HOLD_CHANGED notices to use TT

To test:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Edit system preferences:
     emailLibrarianWhenHoldIsPlaced - Enable
     ReplyToDefault - enter a fake/test email address
     ExpireReservesMaxPickupDelay - Allow
     ExpireReservesAutoFill - Do
     ExpireReservesAutoFillEmail - same email address as ReplyToDefault
4. Place two holds on the same bib for two different patrons, Patron A
   and Patron B
5. Edit an item on that bib to set a call number (if it doesn't have one
   already)
6. Check in that item to set Patron A's hold to waiting
7. Edit the expiration date on Patron A's hold to yesterday's date
   To do this in KTD:
     ktd --shell
     koha-mysql kohadev
     UPDATE reserves SET expirationdate = <yesterday's date>
     WHERE borrowernumber = <Patron A's borrowernumber>;
8. Run misc/cronjobs/holds/cancel_expired_holds.pl to automatically
   cancel the expired hold and fill the next one
9. Open koha-mysql again and run the following query to view the
   generated notices:
   SELECT subject, content FROM message_queue
   WHERE to_address = '<the email address you set in step 3>';
--> Confirm that HOLDPLACED and HOLD_CHANGED notices were both generated
--> Confirm that all information has been filled in correctly for those
    notices
Comment 2 Marion Durand 2025-04-03 15:12:11 UTC
Created attachment 180589 [details] [review]
Bug 36127: Adjust default HOLDPLACED and HOLD_CHANGED notices to use TT

To test:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Edit system preferences:
     emailLibrarianWhenHoldIsPlaced - Enable
     ReplyToDefault - enter a fake/test email address
     ExpireReservesMaxPickupDelay - Allow
     ExpireReservesAutoFill - Do
     ExpireReservesAutoFillEmail - same email address as ReplyToDefault
4. Place two holds on the same bib for two different patrons, Patron A
   and Patron B
5. Edit an item on that bib to set a call number (if it doesn't have one
   already)
6. Check in that item to set Patron A's hold to waiting
7. Edit the expiration date on Patron A's hold to yesterday's date
   To do this in KTD:
     ktd --shell
     koha-mysql kohadev
     UPDATE reserves SET expirationdate = <yesterday's date>
     WHERE borrowernumber = <Patron A's borrowernumber>;
8. Run misc/cronjobs/holds/cancel_expired_holds.pl to automatically
   cancel the expired hold and fill the next one
9. Open koha-mysql again and run the following query to view the
   generated notices:
   SELECT subject, content FROM message_queue
   WHERE to_address = '<the email address you set in step 3>';
--> Confirm that HOLDPLACED and HOLD_CHANGED notices were both generated
--> Confirm that all information has been filled in correctly for those
    notices

Signed-off-by: Marion Durand <marion.durand@biblibre.com>