Bugzilla – Attachment 182774 Details for
Bug 36020
Port default recall notices to Template Toolkit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36020: Port default recall notices to Template Toolkit
Bug-36020-Port-default-recall-notices-to-Template-.patch (text/plain), 8.22 KB, created by
Emily Lamancusa (emlam)
on 2025-05-23 16:10:21 UTC
(
hide
)
Description:
Bug 36020: Port default recall notices to Template Toolkit
Filename:
MIME Type:
Creator:
Emily Lamancusa (emlam)
Created:
2025-05-23 16:10:21 UTC
Size:
8.22 KB
patch
obsolete
>From fd4197cc60a5c1c21347f1b6f6cd2933f0153a63 Mon Sep 17 00:00:00 2001 >From: Lisette Scheer <lisette@bywatersolutions.com> >Date: Wed, 21 May 2025 21:26:38 +0000 >Subject: [PATCH] Bug 36020: Port default recall notices to Template Toolkit > >The following notices relating to recalls all need to be updated to use Template Toolkit syntax: > >RETURN_RECALLED_ITEM >PICKUP_RECALLED_ITEM >RECALL_REQUESTER_DET > >To test: >1) Observe the default notice contains <<>> tags >2) Apply the patch >3) reset_all >4) Check that the notice is now all in template toolkit [% %] tags with html selected >5) Enable recalls >6) Enable SMS >7) Check an item out to a patron >8) Make sure the patron has a primary email, sms, and recall notices enabled >9) Make sure a secondary patron has a primary email, sms, and recall notices enabled >10) Generate a recall on the checked out item for the second patron >11) Check the first patron's notices tab to confirm the return recalled item notice generated properly. >12) Check the item back in and generate the recall slip and confirm it generated correctly. >13) Check the second patron's notices tab to confirm the pickup recalled item notice generated properly. > >Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> >Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >--- > C4/Letters.pm | 6 ++ > .../mysql/en/mandatory/sample_notices.yml | 67 ++++++++++--------- > 2 files changed, 40 insertions(+), 33 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index b7c6b0cedd..d97715ee73 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -2003,6 +2003,12 @@ sub _get_tt_params { > plural => 'problemreports', > pk => 'reportid' > }, >+ recalls => { >+ module => 'Koha::Recalls', >+ singular => 'recall', >+ plural => 'recalls', >+ pk => 'recall_id' >+ }, > }; > > my $dbh = C4::Context->dbh; >diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml >index 1c7a217119..276324f1e0 100644 >--- a/installer/data/mysql/en/mandatory/sample_notices.yml >+++ b/installer/data/mysql/en/mandatory/sample_notices.yml >@@ -2457,81 +2457,82 @@ tables: > code: RETURN_RECALLED_ITEM > branchcode: "" > name: "Notification to return a recalled item" >- is_html: 0 >+ is_html: 1 > title: "Notification to return a recalled item" > message_transport_type: email > lang: default > content: >- - "Date: <<today>>" >- - "" >- - "<<borrowers.firstname>> <<borrowers.surname>>," >- - "" >- - "A recall has been placed on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>). The due date has been updated, and is now <<issues.date_due>>. Please return the item before the due date." >- - "" >+ - "Date: [% today | $KohaDates %]<br>" >+ - "<br>" >+ - "[%~ INCLUDE 'patron-title.inc' patron => borrower, no_title => 1, no_cardnumber => 1 ~%],<br>" >+ - "<br>" >+ - "A recall has been placed on the following item:[%~ INCLUDE 'biblio-title.inc' biblio=biblio link = 0 %][% IF biblio.author %]/ [% biblio.author %][% END %] ([% item.barcode %]). The due date has been updated, and is now [% item.onloan | $KohaDates %]. Please return the item before the due date.<br>" >+ - "<br>" > - "Thank you!" > > - module: circulation > code: PICKUP_RECALLED_ITEM > branchcode: "" > name: "Recalled item awaiting pickup" >- is_html: 0 >+ is_html: 1 > title: "Recalled item awaiting pickup" > message_transport_type: email > lang: default > content: >- - "Date: <<today>>" >- - "" >- - "<<borrowers.firstname>> <<borrowers.surname>>," >- - "" >- - "A recall that you requested on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>) is now ready for you to pick up at <<recalls.pickup_library_id>>. Please pick up your item by <<recalls.expiration_date>>." >- - "" >+ - "[%- USE Branches -%]<br>" >+ - "Date: [% today | $KohaDates %]<br>" >+ - "<br>" >+ - "[%~ INCLUDE 'patron-title.inc' patron => borrower, no_title => 1, no_cardnumber => 1, no_html = 1 ~%],<br>" >+ - "<br>" >+ - "A recall that you requested on the following item: [% INCLUDE 'biblio-title.inc' biblio=biblio link = 0 %][% IF biblio.author %] / [% biblio.author %][% END %] ([% item.barcode %]) is now ready for you to pick up at [% Branches.GetName( recall.pickup_library_id) %]. Please pick up your item by [% recall.expiration_date | $KohaDates %].<br>" >+ - "<br>" > - "Thank you!" > > - module: circulation > code: RETURN_RECALLED_ITEM > branchcode: "" > name: "Notification to return a recalled item" >- is_html: 0 >+ is_html: 1 > title: "Return recalled item" > message_transport_type: sms > lang: default > content: >- - "Your item has been recalled: <<biblio.title>> (<<items.barcode>>). Please return it by <<issues.date_due>." >+ - "Your item has been recalled: [% INCLUDE 'biblio-title.inc' biblio=biblio link = 0 %] ([% item.barcode %]). Please return it by [% item.onloan | $KohaDates %]." > > - module: circulation > code: PICKUP_RECALLED_ITEM > branchcode: "" > name: "Recalled item awaiting pickup" >- is_html: 0 >+ is_html: 1 > title: "Recalled item awaiting pickup" > message_transport_type: sms > lang: default > content: >- - "A recalled item: <<biblio.title>> (<<items.barcode>>) is ready for you to pick up at <<recalls.branchcode>>. Please collect by <<recalls.expirationdate>>." >+ - "A recalled item: [% INCLUDE 'biblio-title.inc' biblio=biblio link = 0 %]([% item.barcode %]) is ready for you to pick up at [% recall.pickup_library_id %]. Please collect by [% recall.expiration_date | $KohaDates %]." > > - module: circulation > code: RECALL_REQUESTER_DET > branchcode: "" > name: "Details of patron who recalled item" >- is_html: 0 >+ is_html: 1 > title: "Details of patron who recalled item" > message_transport_type: print > lang: default > content: >- - "Date: <<today>>" >- - "" >- - "Recall for pickup at <<branches.branchname>>" >- - "<<borrowers.surname>>, <<borrowers.firstname>> (<<borrowers.cardnumber>>)" >- - "<<borrowers.phone>>" >- - "<<borrowers.streetnumber>> <<borrowers.address>>, <<borrowers.address2>>, <<borrowers.city>> <<borrowers.zipcode>>" >- - "<<borrowers.email>>" >- - "" >- - "ITEM RECALLED" >- - "<<biblio.title>> by <<biblio.author>>" >- - "Barcode: <<items.barcode>>" >- - "Callnumber: <<items.itemcallnumber>>" >- - "Waiting since: <<recalls.waiting_date>>" >- - "Notes: <<recalls.notes>>" >+ - "Date: [% today | $KohaDates %]<br>" >+ - "<br>" >+ - "Recall for pickup at [% branch.branchname %]<br>" >+ - "[% INCLUDE 'patron-title.inc' patron => borrower, no_title => 1, no_html = 1 %]<br>" >+ - "[% borrower.phone %]<br>" >+ - "[% borrower.streetnumber %][% IF borrower.address %] [% borrower.address %],[% END %][% IF borrower.address2 %] [% borrower.address2 %],[% END %] [% borrower.city %] [% borrower.state %] [% borrower.zipcode %]<br>" >+ - "[% borrower.email %]<br>" >+ - "<br>" >+ - "ITEM RECALLED<br>" >+ - "[% INCLUDE 'biblio-title.inc' biblio=biblio link = 0 %][% IF biblio.author %] by [% biblio.author %][% END %]<br>" >+ - "Barcode: [% item.barcode %]<br>" >+ - "Callnumber: [% item.itemcallnumber %]<br>" >+ - "Waiting since: [% recall.waiting_date | $KohaDates %]<br>" >+ - "[% IF recall.notes %]Notes: [% recall.notes %]<br>[% END %]" > > - module: members > code: 2FA_DISABLE >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36020
:
166784
|
166934
|
166935
|
170885
|
170886
|
170887
|
170889
|
172134
|
172135
|
172147
|
172148
|
176478
|
176479
|
182711
|
182713
| 182774 |
182775