Bug 36125

Summary: Port default HOLD_SLIP notice to Template Toolkit syntax
Product: Koha Reporter: Emily Lamancusa (emlam) <emily.lamancusa>
Component: NoticesAssignee: Emily Lamancusa (emlam) <emily.lamancusa>
Status: Needs documenting --- QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: enhancement    
Priority: P5 - low CC: barbara.johnson, emily.lamancusa, fridolin.somers
Version: MainKeywords: Academy, roadmap_24_05
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17975
Change sponsored?: --- Patch complexity: String patch
Documentation contact: Documentation submission:
Text to go in the release notes:
The default notice templates for the hold slip now uses modern Template Toolkit rather than the old custom syntax. This will only affect new installations, unless the library chooses to reset their notices to the default.
Version(s) released in:
24.05.00
Circulation function:
Bug Depends on:    
Bug Blocks: 15278    
Attachments: Bug 36125: Adjust default HOLD_SLIP to use TT
Bug 36125: Adjust default HOLD_SLIP to use TT
Bug 36125: (follow-up) Fix missing dollar sign
Bug 36125: Adjust default HOLD_SLIP to use TT
Bug 36125: (follow-up) Use $KohaDates

Description Emily Lamancusa (emlam) 2024-02-16 21:53:50 UTC
Bug 17975 proved that HOLD_SLIP was supported for TT syntax, and could be used as a reference for adjusting the default content.
Comment 1 Emily Lamancusa (emlam) 2024-04-25 21:08:17 UTC
Created attachment 165592 [details] [review]
Bug 36125: Adjust default HOLD_SLIP to use TT

To test:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Find a patron and make sure their account contains values for
   all of the following fields:
   First name
   Surname
   Card number
   Phone
   Address
   Address 2
   City
   Zipcode
   Email
4. Place a hold for this patron, specifying a hold note
5. Check in an item to fill the hold and click "Confirm and print slip"
6. Confirm that all information on the hold slip is correct
Comment 2 ByWater Sandboxes 2024-04-29 17:57:33 UTC
Created attachment 165793 [details] [review]
Bug 36125: Adjust default HOLD_SLIP to use TT

To test:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Find a patron and make sure their account contains values for
   all of the following fields:
   First name
   Surname
   Card number
   Phone
   Address
   Address 2
   City
   Zipcode
   Email
4. Place a hold for this patron, specifying a hold note
5. Check in an item to fill the hold and click "Confirm and print slip"
6. Confirm that all information on the hold slip is correct

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Comment 3 Emily Lamancusa (emlam) 2024-04-30 12:56:20 UTC
Created attachment 165877 [details] [review]
Bug 36125: (follow-up) Fix missing dollar sign
Comment 4 Emily Lamancusa (emlam) 2024-04-30 12:57:53 UTC
Added a follow-up to fix a typo...feel free to squash when pushing
Comment 5 Martin Renvoize (ashimema) 2024-05-08 13:12:21 UTC
Created attachment 166409 [details] [review]
Bug 36125: Adjust default HOLD_SLIP to use TT

To test:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Find a patron and make sure their account contains values for
   all of the following fields:
   First name
   Surname
   Card number
   Phone
   Address
   Address 2
   City
   Zipcode
   Email
4. Place a hold for this patron, specifying a hold note
5. Check in an item to fill the hold and click "Confirm and print slip"
6. Confirm that all information on the hold slip is correct

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize (ashimema) 2024-05-08 13:12:23 UTC
Created attachment 166410 [details] [review]
Bug 36125: (follow-up) Use $KohaDates

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Katrin Fischer 2024-05-10 12:28:45 UTC
Hi there, happy to push as is, but I notice these are "direct" translations of our old templates. It might be nice to make them a little nicer with the added benefits of TT. For an example:

This here will leave the bullet points with nothing after, when the value is not available:

+            - "   <li>[% item.barcode %]</li>"
+            - "   <li>[% item.itemcallnumber %]</li>"
+            - "   <li>[% reserve.waitingdate | $KohaDates %]</li>"

That's a problem now and it will persist in the new version. If we added some IF/ELSE, that might be a cool addition for a future patch.
Comment 8 Katrin Fischer 2024-05-10 13:20:09 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 9 Fridolin Somers 2024-05-29 08:45:36 UTC
Not backported to 23.11.x