Bug 36107

Summary: Port default DUEDGST and PREDUEDGST notices to Template Toolkit
Product: Koha Reporter: Emily Lamancusa <emily.lamancusa>
Component: NoticesAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: caroline.cyr-la-rose
Version: MainKeywords: roadmap_24_05
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 15278    

Description Emily Lamancusa 2024-02-15 19:07:21 UTC
The following notices need to be updated to use Template Toolkit syntax:
DUEDGST (email)
DUEDGST (sms)
PREDUEDGST (email)
PREDUEDGST (sms)

These will be a bit trickier, as they make use of <<items.content>>. The default information in <<items.content>> is the due date, title, author, and barcode of the item. Since this bug is limited to changing the default notice text, and won't affect existing installations, we could be okay to simply replicate that information with Template Toolkit variables for now. We will need to decide what to do about <<items.content>> if/when we deprecate hungry alligator syntax in the long run, though.
Comment 1 Emily Lamancusa 2024-02-15 20:26:50 UTC
Note: the actual text in the SMS sample notices should probably be updated as well - currently they only tell the number of items coming due, which isn't very useful.
Comment 2 Caroline Cyr La Rose 2024-05-07 14:01:24 UTC
(In reply to Emily Lamancusa from comment #1)
> Note: the actual text in the SMS sample notices should probably be updated
> as well - currently they only tell the number of items coming due, which
> isn't very useful.

I think this was due to the limited number of characters you can send in an SMS. If you have one title due, it might fit the the sms message, but if you have 5 titles, it will go over and give an error. Bug 35639 tries to fix the error at least, but the patron will still not get the full information if they have many titles due.
Comment 3 Caroline Cyr La Rose 2024-05-07 14:27:43 UTC
Here's one I just did for PREDUEDGST, with the help of Jonathan

[% FOREACH item IN items %]
[%~ SET checkout = item.checkout %]
[%~ SET biblio = item.biblio %]
<strong>[% biblio.title %]</strong> [% IF biblio.author %]by [% biblio.author %][% ELSE %][% END %]
Call number: [% item.itemcallnumber %]
Due date: [% checkout.date_due | $KohaDates %]
[% END %]