From ba85823d63c0e3bdff4a33e4f6ae2ee4eefdb2b1 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 Content-Type: text/plain; charset=utf-8 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 Signed-off-by: Marcel de Rooy --- 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 aa59914556..8b5b2c45d2 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