From a3a1d7e253420efa16dcd17744de995b4dee76bb Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 15 Aug 2024 15:29:30 +0100 Subject: [PATCH] Bug 36915: (QA follow-up) Passing less to encourage traversal I generally push for contextual use of accessors in TT notices and try to reduce extra lookups. In this case we can access the pickup library branchname directly using the pickup_library relation available to us in the booking object we pass. Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- Koha/Booking.pm | 2 +- installer/data/mysql/en/mandatory/sample_notices.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/Booking.pm b/Koha/Booking.pm index de230e0774..e5297d8d17 100644 --- a/Koha/Booking.pm +++ b/Koha/Booking.pm @@ -262,7 +262,7 @@ sub delete { message_transport_type => 'email', branchcode => $pickup_library->branchcode, lang => $patron->lang, - objects => { booking => $self, branch => $pickup_library } + objects => { booking => $self } ); if ($letter) { diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml index b23f9db57e..ec0e2386da 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.yml +++ b/installer/data/mysql/en/mandatory/sample_notices.yml @@ -64,7 +64,7 @@ tables: - "
" - "Kind regards
" - "
" - - "[% branch.branchname %]" + - "[% booking.pickup_library.branchname %]" - module: catalogue code: TICKET_ACKNOWLEDGE -- 2.39.5