From 320464d5bd9d90d493cf25fdf57196539a464102 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 1 Oct 2020 09:04:43 +0100 Subject: [PATCH] Bug 21898: Add aqbasket to available tables for AQORDER MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch should allow <> replacements to work in both email subject and email content fields for notices. Test plan 1/ Add <> into the AQORDER notice (In the subject line and content box) 2/ Trigger said notice to send (before applying the patch) 3/ Note that the replacements have not taken place.. <> is present as is. 4/ Apply patch 5/ Trigger the notice again 6/ Note that the replacements are now made. 7/ Signoff Signed-off-by: Séverine QUEUNE --- C4/Letters.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index 2bae52d..710706d 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -469,9 +469,10 @@ sub SendAlerts { letter_code => $letter_code, branchcode => $userenv->{branch}, tables => { - 'branches' => $userenv->{branch}, + 'branches' => $userenv->{branch}, 'aqbooksellers' => $databookseller, 'aqcontacts' => $datacontact, + 'aqbasket' => $externalid, }, repeat => $dataorders, want_librarian => 1, @@ -762,6 +763,7 @@ sub _parseletter_sth { ($table eq 'suggestions' ) ? "SELECT * FROM $table WHERE suggestionid = ?" : ($table eq 'aqbooksellers') ? "SELECT * FROM $table WHERE id = ?" : ($table eq 'aqorders' ) ? "SELECT * FROM $table WHERE ordernumber = ?" : + ($table eq 'aqbasket' ) ? "SELECT * FROM $table WHERE basketno = ?" : ($table eq 'opac_news' ) ? "SELECT * FROM $table WHERE idnew = ?" : ($table eq 'article_requests') ? "SELECT * FROM $table WHERE id = ?" : ($table eq 'borrower_modifications') ? "SELECT * FROM $table WHERE verification_token = ?" : -- 2.1.4