From 8f37894c8362c1bc9907a48acc6eb17c402994a9 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 8 Nov 2023 11:28:32 -0300 Subject: [PATCH] Bug 17617: Unify DBRev Signed-off-by: Tomas Cohen Arazi --- ...17617_-_add_EmailPatronWhenHoldIsPlaced.pl | 11 ++++++++++- ...ug_17617_-_add_HOLDPLACED_PATRON_notice.pl | 19 ------------------- 2 files changed, 10 insertions(+), 20 deletions(-) delete mode 100755 installer/data/mysql/atomicupdate/bug_17617_-_add_HOLDPLACED_PATRON_notice.pl diff --git a/installer/data/mysql/atomicupdate/bug_17617_-_add_EmailPatronWhenHoldIsPlaced.pl b/installer/data/mysql/atomicupdate/bug_17617_-_add_EmailPatronWhenHoldIsPlaced.pl index 7f07137ca1..794f1d2dd4 100755 --- a/installer/data/mysql/atomicupdate/bug_17617_-_add_EmailPatronWhenHoldIsPlaced.pl +++ b/installer/data/mysql/atomicupdate/bug_17617_-_add_EmailPatronWhenHoldIsPlaced.pl @@ -11,6 +11,15 @@ return { q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('EmailPatronWhenHoldIsPlaced', '0', NULL, 'Email patron when a hold has been placed for them', 'YesNo') } ); - say $out "Added system preference 'EmailPatronWhenHoldIsPlaced'"; + say $out "Added new system preference 'EmailPatronWhenHoldIsPlaced'"; + + $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 new letter 'HOLDPLACED_PATRON' (email)"; }, }; 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 deleted file mode 100755 index 55abc5cdc3..0000000000 --- a/installer/data/mysql/atomicupdate/bug_17617_-_add_HOLDPLACED_PATRON_notice.pl +++ /dev/null @@ -1,19 +0,0 @@ -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'"; - }, -}; -- 2.39.5