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!"