From b62699dff077035d6db225388d446ed569fbcd93 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Thu, 26 Oct 2023 02:37:01 +0000 Subject: [PATCH] Bug 17617: Add HOLDPLACED_PATRON notice A HOLDPLACED notice exists and is used by the emailLibrarianWhenHoldIsPlaced function, but libraries may want to use different wording when emailing patrons. Signed-off-by: Kelly Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- ...ug_17617_-_add_HOLDPLACED_PATRON_notice.pl | 19 +++++++++++++++++++ .../mysql/en/mandatory/sample_notices.yml | 14 ++++++++++++++ 2 files changed, 33 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_17617_-_add_HOLDPLACED_PATRON_notice.pl diff --git a/installer/data/mysql/atomicupdate/bug_17617_-_add_HOLDPLACED_PATRON_notice.pl b/installer/data/mysql/atomicupdate/bug_17617_-_add_HOLDPLACED_PATRON_notice.pl new file mode 100755 index 0000000000..55abc5cdc3 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_17617_-_add_HOLDPLACED_PATRON_notice.pl @@ -0,0 +1,19 @@ +use Modern::Perl; + +return { + bug_number => "17617", + description => "Notify patron when their hold has been placed", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{INSERT IGNORE INTO letter (module, code, branchcode, name, is_html, title, message_transport_type, lang, content) VALUES ("reserves", "HOLDPLACED_PATRON", "", "Hold is confirmed", 0, "Your hold on [% hold.biblio.title %] is confirmed", "email", "default", "Hello [% borrower.firstname %] [% borrower.surname %] ([% borrower.cardnumber %]), +Your hold on [% hold.biblio.title %] ([% hold.biblio.id %]) has been confirmed. +You will be notified by the library when your item is available for pickup. +Thank you!")} + ); + + say $out "Added notice 'HOLDPLACED_PATRON'"; + }, +}; diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml index e4a52dda8b..9675b3eb4f 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.yml +++ b/installer/data/mysql/en/mandatory/sample_notices.yml @@ -2453,3 +2453,17 @@ tables: - " [%~ END ~%]" - " [% item_attribute.processing_attribute.name %]: [% value %]" - "[% END %]" + + - module: reserves + code: HOLDPLACED_PATRON + branchcode: "" + name: "Hold is confirmed" + is_html: 0 + title: "Your hold on [% hold.biblio.title %] is confirmed" + message_transport_type: email + lang: default + content: + - "Hello [% borrower.firstname %] [% borrower.surname %] ([% borrower.cardnumber %])," + - "Your hold on [% hold.biblio.title %] ([% hold.biblio.id %]) has been confirmed." + - "You will be notified by the library when your item is available for pickup." + - "Thank you!" -- 2.39.5