Bug 32211 - Update sample (pre) due notices to use TT syntax
Summary: Update sample (pre) due notices to use TT syntax
Status: Passed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Andrew Fuerste-Henry
QA Contact: Testopia
URL:
Keywords: no-sandbox
Depends on: 29100
Blocks:
  Show dependency treegraph
 
Reported: 2022-11-15 15:34 UTC by Katrin Fischer
Modified: 2025-01-16 13:04 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 32211: Update DUEDGST and PREDUEDGST default notices to use TT (3.78 KB, patch)
2024-12-09 20:46 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 32211: Update DUEDGST and PREDUEDGST default notices to use TT (2.10 KB, patch)
2025-01-10 19:57 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 32211: Update DUEDGST and PREDUEDGST default notices to use TT (3.83 KB, patch)
2025-01-10 20:09 UTC, Brendan Lawlor
Details | Diff | Splinter Review
Bug 32211: Update DUEDGST and PREDUEDGST default notices to use TT (2.15 KB, patch)
2025-01-10 20:09 UTC, Brendan Lawlor
Details | Diff | Splinter Review
Bug 32211: Update DUEDGST and PREDUEDGST default notices to use TT (3.91 KB, patch)
2025-01-16 13:04 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2022-11-15 15:34:35 UTC
With 29100 we can improve the notices to show how TT can be used to get all the information we need here and have nice formatting (replacing items.content especially).
Comment 1 Andrew Fuerste-Henry 2024-12-09 19:58:39 UTC
DUE and PREDUE got handled in Bug 36106, but we still need to update the digest versions.
Comment 2 Andrew Fuerste-Henry 2024-12-09 20:46:48 UTC
Created attachment 175337 [details] [review]
Bug 32211: Update DUEDGST and PREDUEDGST default notices to use TT

To test:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Enable SMS Notices
    a) Find the system preference SMSSendDriver
    b) Enter "Email" as the value for SMSSendDriver and save
4. Go to a patron account, and set the following messaging preferences:
    Item due:
        - Check SMS
        - Check Email
        - Check Digests only for both
    Advance notice
        - Select 1 day in advance
        - Check SMS
        - Check Email
        - Check Digest only for both
5. Go to the checkout tab for that patron
6. Set a custom due date for today and check out 2+ items
7. Set a custom due date for tomorrow and check out 2+ more items
8. Run the cron job to generate notices:
   misc/cronjobs/advance_notices.pl -v -c
9. Open the Notices tab on that patron's account
--> The patron should have four notices:
    Item due reminder (one for SMS and one for email)
    Advance notice of item due (one for SMS and one for email)
10. Open each notice and confirm that all information is correct
Comment 3 Brendan Lawlor 2025-01-10 18:26:45 UTC
The email type Item due reminder notice has a small mistake.

On line 744 the checkouts array variable name needs to be in lowercase like
[% FOREACH checkout IN checkouts %]

or else the items' title author and barcode do not render.

The other 3 notices displayed correctly
Comment 4 Andrew Fuerste-Henry 2025-01-10 19:57:45 UTC
Created attachment 176390 [details] [review]
Bug 32211: Update DUEDGST and PREDUEDGST default notices to use TT

update to correct CHECKOUT capitalization

To test:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Enable SMS Notices
    a) Find the system preference SMSSendDriver
    b) Enter "Email" as the value for SMSSendDriver and save
4. Go to a patron account, and set the following messaging preferences:
    Item due:
        - Check SMS
        - Check Email
        - Check Digests only for both
    Advance notice
        - Select 1 day in advance
        - Check SMS
        - Check Email
        - Check Digest only for both
5. Go to the checkout tab for that patron
6. Set a custom due date for today and check out 2+ items
7. Set a custom due date for tomorrow and check out 2+ more items
8. Run the cron job to generate notices:
   misc/cronjobs/advance_notices.pl -v -c
9. Open the Notices tab on that patron's account
--> The patron should have four notices:
    Item due reminder (one for SMS and one for email)
    Advance notice of item due (one for SMS and one for email)
10. Open each notice and confirm that all information is correct
Comment 5 Andrew Fuerste-Henry 2025-01-10 19:58:28 UTC
(In reply to Brendan Lawlor from comment #3)
> The email type Item due reminder notice has a small mistake.
> 
> On line 744 the checkouts array variable name needs to be in lowercase like
> [% FOREACH checkout IN checkouts %]
> 
> or else the items' title author and barcode do not render.
> 
> The other 3 notices displayed correctly

Whoops! Thanks for catching.
Comment 6 Brendan Lawlor 2025-01-10 20:09:12 UTC
Created attachment 176391 [details] [review]
Bug 32211: Update DUEDGST and PREDUEDGST default notices to use TT

To test:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Enable SMS Notices
    a) Find the system preference SMSSendDriver
    b) Enter "Email" as the value for SMSSendDriver and save
4. Go to a patron account, and set the following messaging preferences:
    Item due:
        - Check SMS
        - Check Email
        - Check Digests only for both
    Advance notice
        - Select 1 day in advance
        - Check SMS
        - Check Email
        - Check Digest only for both
5. Go to the checkout tab for that patron
6. Set a custom due date for today and check out 2+ items
7. Set a custom due date for tomorrow and check out 2+ more items
8. Run the cron job to generate notices:
   misc/cronjobs/advance_notices.pl -v -c
9. Open the Notices tab on that patron's account
--> The patron should have four notices:
    Item due reminder (one for SMS and one for email)
    Advance notice of item due (one for SMS and one for email)
10. Open each notice and confirm that all information is correct

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Comment 7 Brendan Lawlor 2025-01-10 20:09:14 UTC
Created attachment 176392 [details] [review]
Bug 32211: Update DUEDGST and PREDUEDGST default notices to use TT

update to correct CHECKOUT capitalization

To test:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Enable SMS Notices
    a) Find the system preference SMSSendDriver
    b) Enter "Email" as the value for SMSSendDriver and save
4. Go to a patron account, and set the following messaging preferences:
    Item due:
        - Check SMS
        - Check Email
        - Check Digests only for both
    Advance notice
        - Select 1 day in advance
        - Check SMS
        - Check Email
        - Check Digest only for both
5. Go to the checkout tab for that patron
6. Set a custom due date for today and check out 2+ items
7. Set a custom due date for tomorrow and check out 2+ more items
8. Run the cron job to generate notices:
   misc/cronjobs/advance_notices.pl -v -c
9. Open the Notices tab on that patron's account
--> The patron should have four notices:
    Item due reminder (one for SMS and one for email)
    Advance notice of item due (one for SMS and one for email)
10. Open each notice and confirm that all information is correct

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Comment 8 Jonathan Druart 2025-01-16 13:04:24 UTC
Created attachment 176652 [details] [review]
Bug 32211: Update DUEDGST and PREDUEDGST default notices to use TT

To test:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Enable SMS Notices
    a) Find the system preference SMSSendDriver
    b) Enter "Email" as the value for SMSSendDriver and save
4. Go to a patron account, and set the following messaging preferences:
    Item due:
        - Check SMS
        - Check Email
        - Check Digests only for both
    Advance notice
        - Select 1 day in advance
        - Check SMS
        - Check Email
        - Check Digest only for both
5. Go to the checkout tab for that patron
6. Set a custom due date for today and check out 2+ items
7. Set a custom due date for tomorrow and check out 2+ more items
8. Run the cron job to generate notices:
   misc/cronjobs/advance_notices.pl -v -c
9. Open the Notices tab on that patron's account
--> The patron should have four notices:
    Item due reminder (one for SMS and one for email)
    Advance notice of item due (one for SMS and one for email)
10. Open each notice and confirm that all information is correct

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>