Bug 36020 - Port default recall notices to Template Toolkit
Summary: Port default recall notices to Template Toolkit
Status: Passed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Lisette Scheer
QA Contact: Emily Lamancusa (emlam)
URL:
Keywords: Academy
: 37793 (view as bug list)
Depends on:
Blocks: 15278
  Show dependency treegraph
 
Reported: 2024-02-07 15:00 UTC by Emily Lamancusa (emlam)
Modified: 2025-05-23 16:17 UTC (History)
6 users (show)

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


Attachments
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: (4.73 KB, patch)
2024-05-15 14:41 UTC, Lisette Scheer
Details | Diff | Splinter Review
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: (4.80 KB, patch)
2024-05-20 09:40 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36020: (follow-up) Use title includes (3.48 KB, patch)
2024-05-20 09:40 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36020: (follow-up) Use title includes (3.48 KB, patch)
2024-08-29 21:13 UTC, Lisette Scheer
Details | Diff | Splinter Review
Bug 36020: (follow-up) Fix title includes This patch updates the recall notices to fill the titles when using the title include. (2.75 KB, patch)
2024-08-29 21:22 UTC, Lisette Scheer
Details | Diff | Splinter Review
Bug 36020: (follow-up) Fix title includes (2.75 KB, patch)
2024-08-29 21:24 UTC, Lisette Scheer
Details | Diff | Splinter Review
Bug 36020: (follow-up) Changed biblio=title to biblio=biblio (2.97 KB, patch)
2024-08-29 22:43 UTC, Lisette Scheer
Details | Diff | Splinter Review
Bug 36020: (follow-up) Changed biblio=title to biblio=biblio Note: fixed a typo (2.97 KB, patch)
2024-09-27 15:50 UTC, Lisette Scheer
Details | Diff | Splinter Review
Bug: 36020: (follow-up) fixed no_html and recalls to recall (2.67 KB, patch)
2024-09-27 15:51 UTC, Lisette Scheer
Details | Diff | Splinter Review
Bug: 36020: (follow-up) fixed no_html and recalls to recall (2.67 KB, patch)
2024-09-27 18:04 UTC, Lisette Scheer
Details | Diff | Splinter Review
Bug 36020: (follow-up) Add TT support to recall notices (792 bytes, patch)
2024-09-27 18:05 UTC, Lisette Scheer
Details | Diff | Splinter Review
Bug 36020: (follow-up) Fix formatting and dates (5.59 KB, patch)
2025-01-13 22:29 UTC, Lisette Scheer
Details | Diff | Splinter Review
Bug 36020: (follow-up) fixed no_html and recalls to recall (2.67 KB, patch)
2025-01-13 22:30 UTC, Lisette Scheer
Details | Diff | Splinter Review
Bug 36020: Port default recall notices to Template Toolkit (8.09 KB, patch)
2025-05-21 21:35 UTC, Lisette Scheer
Details | Diff | Splinter Review
Bug 36020: Port default recall notices to Template Toolkit (8.15 KB, patch)
2025-05-22 00:31 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 36020: Port default recall notices to Template Toolkit (8.22 KB, patch)
2025-05-23 16:10 UTC, Emily Lamancusa (emlam)
Details | Diff | Splinter Review
Bug 36020: (QA follow-up) A few minor corrections (3.90 KB, patch)
2025-05-23 16:10 UTC, Emily Lamancusa (emlam)
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-07 15:00:07 UTC
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
Comment 1 Lisette Scheer 2024-05-15 14:41:08 UTC
Created attachment 166784 [details] [review]
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
5) Enable recalls
6) Check an item out to a patron
7) Make sure the patron has a primary email
8) Make sure a secondary patron has a primary email
9) Generate a recall on the checked out item for the second patron
10) Check the first patron's notices tab to confirm the return recalled item notice generated properly.
11) Check the item back in and generate the recall slip and confirm it generated correctly.
12) Check the second patron's notices tab to confirm the pickup recalled item notice generated properly.
Comment 2 Martin Renvoize (ashimema) 2024-05-20 09:40:35 UTC
Created attachment 166934 [details] [review]
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
5) Enable recalls
6) Check an item out to a patron
7) Make sure the patron has a primary email
8) Make sure a secondary patron has a primary email
9) Generate a recall on the checked out item for the second patron
10) Check the first patron's notices tab to confirm the return recalled item notice generated properly.
11) Check the item back in and generate the recall slip and confirm it generated correctly.
12) Check the second patron's notices tab to confirm the pickup recalled item notice generated properly.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 3 Martin Renvoize (ashimema) 2024-05-20 09:40:37 UTC
Created attachment 166935 [details] [review]
Bug 36020: (follow-up) Use title includes

This patch updates the recall sample notices to use the patron-title and
biblio-title includes for patron and biblio title displays.
Comment 4 Lucas Gass (lukeg) 2024-08-27 15:35:07 UTC
'biblio-title.inc' produces the text "No bibliographic record" for me with this applied. 

'biblio-title.inc' biblio=title'

Shouldn't this pass the biblionumber?
Comment 5 Lisette Scheer 2024-08-29 21:13:44 UTC
Created attachment 170885 [details] [review]
Bug 36020: (follow-up) Use title includes

This patch updates the recall sample notices to use the patron-title and
biblio-title includes for patron and biblio title displays.
Comment 6 Lisette Scheer 2024-08-29 21:22:00 UTC
Created attachment 170886 [details] [review]
Bug 36020: (follow-up) Fix title includes This patch updates the recall notices to fill the titles when using the title include.

Author:    Lisette Scheer <lisette@bywatersolutions.com>
Comment 7 Lisette Scheer 2024-08-29 21:24:32 UTC
Created attachment 170887 [details] [review]
Bug 36020: (follow-up) Fix title includes

This patch updates the recall notices to fill the titles when using the title include.

 Author:    Lisette Scheer <lisette@bywatersolutions.com>
Comment 8 Lisette Scheer 2024-08-29 22:43:26 UTC
Created attachment 170889 [details] [review]
Bug 36020: (follow-up) Changed biblio=title to biblio=biblio

Note: fixed a typo
Comment 9 Jason Robb 2024-09-27 15:19:26 UTC
A couple of notices have errors:

RECALL_REQUESTER_DET
- The commas in the address are included even if a patron does not have address info stored in the account
- HTML isn't rendered under the ITEMS RECALLED heading

PICKUP_RECALLED_ITEM
- Recall pickup location is not present
- Recall expiration date is not present
Comment 10 Lisette Scheer 2024-09-27 15:50:25 UTC
Created attachment 172134 [details] [review]
Bug 36020: (follow-up) Changed biblio=title to biblio=biblio Note: fixed a typo
Comment 11 Lisette Scheer 2024-09-27 15:51:39 UTC
Created attachment 172135 [details] [review]
Bug: 36020: (follow-up) fixed no_html and recalls to recall

Fixed the errors from the last comment. 
To test: follow the test plan and confirm it works now.
Comment 12 Lisette Scheer 2024-09-27 18:04:50 UTC
Created attachment 172147 [details] [review]
Bug: 36020: (follow-up) fixed no_html and recalls to recall
Comment 13 Lisette Scheer 2024-09-27 18:05:30 UTC
Created attachment 172148 [details] [review]
Bug 36020: (follow-up) Add TT support to recall notices
Comment 14 Jason Robb 2024-09-27 19:16:34 UTC
RECALL_REQUESTER_DET
- This slip is still displaying unrendered HTML:

Date: 09/27/2024
Recall for pickup at Centerville
koha (42)
, ,
example2@example.com
ITEM RECALLED
<span class="biblio-title">Seesaw</span> by Hart, Beth
Barcode: 39999000013733
Callnumber:
Waiting since: 2024-09-27 18:37:03
Notes:

- It would be good to omit the extra commas in the address line if there's no data

- borrower.state is missing between borrower.city and borrower.zipcode

RETURN_RECALLED_ITEM
- Still not showing the issue.date_due

PICKUP_RECALLED_ITEM
- It would be better to use the branch's name rather than its id in the [% recall.pickup_library_id %] area
Comment 15 Lisette Scheer 2025-01-13 22:29:35 UTC
Created attachment 176478 [details] [review]
Bug 36020: (follow-up) Fix formatting and dates

RECALL_REQUESTER_DET will need to be marked as HTML.
I fixed all the issues from Comment 14.
Comment 16 Lisette Scheer 2025-01-13 22:30:42 UTC
Created attachment 176479 [details] [review]
Bug 36020: (follow-up) fixed no_html and recalls to recall

Fixed a typo in the commit title.
Comment 17 Aleisha Amohia 2025-05-19 02:28:07 UTC
Hey everyone, this fix is of interest to us - can we help revive it or do you have plans to come back to it soon?
Comment 18 Lisette Scheer 2025-05-19 14:11:51 UTC
I plan on working on it this week.
Comment 19 Aleisha Amohia 2025-05-19 21:25:43 UTC
Thanks Lisette. One of our libraries is happy to sponsor this so let me know if I can help you out. Maybe I can test when you're ready.

Aleisha
Comment 20 Lisette Scheer 2025-05-21 21:28:40 UTC
(In reply to Aleisha Amohia from comment #19)
> Thanks Lisette. One of our libraries is happy to sponsor this so let me know
> if I can help you out. Maybe I can test when you're ready.
> 
> Aleisha

I've done some work on it again and realized what stopped me last time I tried:
In RETURN_RECALLED_ITEM:

[%~ INCLUDE 'patron-title.inc' patron => borrower, no_title => 1, no_cardnumber => 1 ~%],

comes out 
Henry Acevedo , 
and I can't make the extra space go away

The same thing happens in  PICKUP_RECALLED_ITEM 

Edna Acosta ,

I think this might be a bigger issue than this bug. 
I'm attaching the patches, but I'm not sure it's ready for SO until we can get the extra space fixed. 

There's no space in the last name, the patron-title.inc doesn't seem to have one either.
Comment 21 Lisette Scheer 2025-05-21 21:35:15 UTC
Created attachment 182711 [details] [review]
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.
Comment 22 Aleisha Amohia 2025-05-22 00:30:30 UTC
(In reply to Lisette Scheer from comment #20)
> (In reply to Aleisha Amohia from comment #19)
> > Thanks Lisette. One of our libraries is happy to sponsor this so let me know
> > if I can help you out. Maybe I can test when you're ready.
> > 
> > Aleisha
> 
> I've done some work on it again and realized what stopped me last time I
> tried:
> In RETURN_RECALLED_ITEM:
> 
> [%~ INCLUDE 'patron-title.inc' patron => borrower, no_title => 1,
> no_cardnumber => 1 ~%],
> 
> comes out 
> Henry Acevedo , 
> and I can't make the extra space go away
> 
> The same thing happens in  PICKUP_RECALLED_ITEM 
> 
> Edna Acosta ,
> 
> I think this might be a bigger issue than this bug. 
> I'm attaching the patches, but I'm not sure it's ready for SO until we can
> get the extra space fixed. 
> 
> There's no space in the last name, the patron-title.inc doesn't seem to have
> one either.

I spent a really silly amount of time trying to fix this, but couldn't. Then I tested with the booking confirmation notice and it looks like the space happens there too. So I think fixing that space would be out of the scope for this. So I'll just test your patch!
Comment 23 Aleisha Amohia 2025-05-22 00:31:20 UTC
Created attachment 182713 [details] [review]
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>
Comment 24 Aleisha Amohia 2025-05-22 00:35:19 UTC
(In reply to Aleisha Amohia from comment #22)
> (In reply to Lisette Scheer from comment #20)
> > I've done some work on it again and realized what stopped me last time I
> > tried:
> > In RETURN_RECALLED_ITEM:
> > 
> > [%~ INCLUDE 'patron-title.inc' patron => borrower, no_title => 1,
> > no_cardnumber => 1 ~%],
> > 
> > comes out 
> > Henry Acevedo , 
> > and I can't make the extra space go away
> > 
> > The same thing happens in  PICKUP_RECALLED_ITEM 
> > 
> > Edna Acosta ,
> > 
> > I think this might be a bigger issue than this bug. 
> > I'm attaching the patches, but I'm not sure it's ready for SO until we can
> > get the extra space fixed. 
> > 
> > There's no space in the last name, the patron-title.inc doesn't seem to have
> > one either.
> 
> I spent a really silly amount of time trying to fix this, but couldn't. Then
> I tested with the booking confirmation notice and it looks like the space
> happens there too. So I think fixing that space would be out of the scope
> for this. So I'll just test your patch!

I've reported this as a different bug, Bug 39963
Comment 25 Emily Lamancusa (emlam) 2025-05-23 16:10:21 UTC
Created attachment 182774 [details] [review]
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>
Comment 26 Emily Lamancusa (emlam) 2025-05-23 16:10:24 UTC
Created attachment 182775 [details] [review]
Bug 36020: (QA follow-up) A few minor corrections

Remove unneeded <br> in RECALL_REQUESTER_DET

Add IFs to RECALL_REQUESTER_DET to avoid displaying empty lines if
there is no phone, email, and/or callnumber to display

Use checkout.date_due instead of item.onloan due to bug 39985

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 27 Emily Lamancusa (emlam) 2025-05-23 16:16:53 UTC
I found two more bugs (bug 39984 and bug 39985) when testing this, but I can reproduce both in main, so they are not blockers for this patch. I made a few small tweaks in a follow-up but everything else looks good! Thanks, Lisette!
Comment 28 Emily Lamancusa (emlam) 2025-05-23 16:17:49 UTC
*** Bug 37793 has been marked as a duplicate of this bug. ***