Bug 36110 - Port default OVERDUES_SLIP to Template Toolkit syntax
Summary: Port default OVERDUES_SLIP to Template Toolkit syntax
Status: Passed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Emily Lamancusa (emlam)
QA Contact: Lucas Gass (lukeg)
URL:
Keywords:
Depends on: 17976
Blocks: 15278
  Show dependency treegraph
 
Reported: 2024-02-15 21:46 UTC by Emily Lamancusa (emlam)
Modified: 2025-04-18 15:17 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement replaces the default OVERDUES_SLIP syntax, converting it from Koha's bespoke syntax to the more standard Template Toolkit syntax.
Version(s) released in:
Circulation function:


Attachments
Bug 36110: Adjust OVERDUES_SLIP to use Template Toolkit (2.75 KB, patch)
2024-12-18 14:57 UTC, Emily Lamancusa (emlam)
Details | Diff | Splinter Review
Bug 36110: (follow-up) Adjust OVERDUES_SLIP to use Template Toolkit (1.06 KB, patch)
2025-04-03 14:30 UTC, Marion Durand
Details | Diff | Splinter Review
Bug 36110: Adjust OVERDUES_SLIP to use Template Toolkit (2.89 KB, patch)
2025-04-15 17:02 UTC, Emmanuel Bétemps
Details | Diff | Splinter Review
Bug 36110: (follow-up) Adjust OVERDUES_SLIP to use Template Toolkit (1.20 KB, patch)
2025-04-15 17:02 UTC, Emmanuel Bétemps
Details | Diff | Splinter Review
Bug 36110: Adjust OVERDUES_SLIP to use Template Toolkit (2.95 KB, patch)
2025-04-18 15:15 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 36110: (follow-up) Adjust OVERDUES_SLIP to use Template Toolkit (1.26 KB, patch)
2025-04-18 15:15 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Emily Lamancusa (emlam) 2024-02-15 21:46:45 UTC

    
Comment 1 Emily Lamancusa (emlam) 2024-09-27 15:09:20 UTC
This one cannot be updated until we have a TT equivalent for <<items.fine>>. bug 17976 was filed for this a while back, but it is still in the NEW status.
Comment 2 Emily Lamancusa (emlam) 2024-10-31 15:30:58 UTC
Bug 17976 is now PQA, so this is no longer blocked
Comment 3 Emily Lamancusa (emlam) 2024-12-18 14:57:42 UTC
Created attachment 175657 [details] [review]
Bug 36110: Adjust OVERDUES_SLIP to use Template Toolkit

To test:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Set system preferences finesMode to Calculate and charge
4. Edit default circulation rule so that fines will be calculated:
   Unit - Days
   Fine amount - 0.50
   Fine charging interval - 1
   When to charge - Start of interval
5. Check 2 items out to a patron with a custom due date of a few days in
   the past
6. On the patron's account page, click Print > Print overdues
--> Look at the print preview of the slip, and confirm that the item
    information is displayed and formatted correctly
7. In another tab, edit the 2 items to add a call number (if they don't
   already have one)
8. Print overdues again
--> Confirm the slip still looks good
9. Run the fines cronjob to generate some overdue fines
   ktd --shell
   misc/cronjobs/fines.pl -v -c
10. Print overdues again
--> Confirm the fines are included and slip still looks good
11. Check in one of the overdue items
12. Print overdues again
--> Confirm slip now says "item is" instead of "items are"
Comment 4 Marion Durand 2025-04-03 14:26:02 UTC
The test plan failed at point 12. Even if I have only 1 item checked out it still display "items are".
We need to use overdues.count() and not just overdues

I will to submit a follow up shortly to fix this point.
Comment 5 Marion Durand 2025-04-03 14:30:41 UTC
Created attachment 180573 [details] [review]
Bug 36110: (follow-up) Adjust OVERDUES_SLIP to use Template Toolkit
Comment 6 Emmanuel Bétemps 2025-04-15 17:02:48 UTC
Created attachment 180978 [details] [review]
Bug 36110: Adjust OVERDUES_SLIP to use Template Toolkit

To test:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Set system preferences finesMode to Calculate and charge
4. Edit default circulation rule so that fines will be calculated:
   Unit - Days
   Fine amount - 0.50
   Fine charging interval - 1
   When to charge - Start of interval
5. Check 2 items out to a patron with a custom due date of a few days in
   the past
6. On the patron's account page, click Print > Print overdues
--> Look at the print preview of the slip, and confirm that the item
    information is displayed and formatted correctly
7. In another tab, edit the 2 items to add a call number (if they don't
   already have one)
8. Print overdues again
--> Confirm the slip still looks good
9. Run the fines cronjob to generate some overdue fines
   ktd --shell
   misc/cronjobs/fines.pl -v -c
10. Print overdues again
--> Confirm the fines are included and slip still looks good
11. Check in one of the overdue items
12. Print overdues again
--> Confirm slip now says "item is" instead of "items are"

Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Comment 7 Emmanuel Bétemps 2025-04-15 17:02:51 UTC
Created attachment 180979 [details] [review]
Bug 36110: (follow-up) Adjust OVERDUES_SLIP to use Template Toolkit

Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Comment 8 Emmanuel Bétemps 2025-04-15 17:05:38 UTC
Hi,

after running 'misc/cronjobs/fines.pl -v -c', I got 'Unknown option: c' but everything else was ok !

Manu.
Comment 9 Emily Lamancusa (emlam) 2025-04-15 19:59:21 UTC
(In reply to Emmanuel Bétemps from comment #8)
> Hi,
> 
> after running 'misc/cronjobs/fines.pl -v -c', I got 'Unknown option: c' but
> everything else was ok !
> 
> Manu.

My bad, I must have assumed fines.pl had a -c / confirm flag when it doesn't! Thank you for testing!
Comment 10 Lucas Gass (lukeg) 2025-04-18 15:15:55 UTC
Created attachment 181185 [details] [review]
Bug 36110: Adjust OVERDUES_SLIP to use Template Toolkit

To test:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Set system preferences finesMode to Calculate and charge
4. Edit default circulation rule so that fines will be calculated:
   Unit - Days
   Fine amount - 0.50
   Fine charging interval - 1
   When to charge - Start of interval
5. Check 2 items out to a patron with a custom due date of a few days in
   the past
6. On the patron's account page, click Print > Print overdues
--> Look at the print preview of the slip, and confirm that the item
    information is displayed and formatted correctly
7. In another tab, edit the 2 items to add a call number (if they don't
   already have one)
8. Print overdues again
--> Confirm the slip still looks good
9. Run the fines cronjob to generate some overdue fines
   ktd --shell
   misc/cronjobs/fines.pl -v -c
10. Print overdues again
--> Confirm the fines are included and slip still looks good
11. Check in one of the overdue items
12. Print overdues again
--> Confirm slip now says "item is" instead of "items are"

Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 11 Lucas Gass (lukeg) 2025-04-18 15:15:57 UTC
Created attachment 181186 [details] [review]
Bug 36110: (follow-up) Adjust OVERDUES_SLIP to use Template Toolkit

Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>