From 142500a58e631781a2c271e98ba512940e2030be 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 ACQORDER 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 ACQORDER 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 Signed-off-by: Katrin Fischer JD amended patch: fix alignment in hashref, edit commit message to fix letter code "AQORDER" vs "ACQORDER" --- C4/Letters.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index 2bae52d346..2c97d9e01c 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.20.1