From 80bb2fd8b3ff85d13f75f5503f918e876779d2d7 Mon Sep 17 00:00:00 2001 From: Emily Lamancusa Date: Thu, 10 Oct 2024 14:46:24 -0400 Subject: [PATCH] Bug 38095: Include logged-in branch in custom patron message To test: 1. Create a new notice template for a custom patron message i. Go to Tools > Notices and Slips ii. Create a new notice and choose Patrons (custom message) module iii. Add the following text to the email notice: You have a new notification from [% branches.branchname %] iv. Fill in other fields and save 2. Find a patron and go to their details page 3. Send the custom notice you just created i. Click Add message ii. Under "add a message for", select the email option iii. Under "Patron notice", select the notice you just created iv. Click "Save" 4. Open the patron's notices tab and look at the notice that was sent --> The branch name is left blank 5. Apply patch and refresh the patron page 6. Repeat steps 3-4 --> The branch code is now included in the notice Signed-off-by: Janusz Kaczmarek --- circ/add_message.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/circ/add_message.pl b/circ/add_message.pl index 08cf1e4d9f..be519ab40d 100755 --- a/circ/add_message.pl +++ b/circ/add_message.pl @@ -81,7 +81,10 @@ if ( $op eq 'cud-edit_message' && $message_id ) { module => 'add_message', letter_code => $letter_code, lang => $patron->lang, - tables => { 'borrowers' => $borrowernumber }, + tables => { + 'borrowers' => $borrowernumber, + 'branches' => $branchcode, + }, ); } -- 2.39.5