From a912709898952849ab9843fe31f9591af1d1b685 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 15 Jun 2023 08:51:32 +0000 Subject: [PATCH] Bug 28688: Add new notice MEMBERSHIP_RENEWED Test plan: Run new install or upgrade. Check for this notice under Tools/Notices. Signed-off-by: Marcel de Rooy Signed-off-by: Lucas Gass Signed-off-by: Marcel de Rooy [EDIT] Enrollment fee via object instead of substitute hash. Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- .../data/mysql/atomicupdate/bug_28688.pl | 17 ++++++++++++++++ .../mysql/en/mandatory/sample_notices.yml | 20 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_28688.pl diff --git a/installer/data/mysql/atomicupdate/bug_28688.pl b/installer/data/mysql/atomicupdate/bug_28688.pl new file mode 100755 index 0000000000..c807695a2a --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_28688.pl @@ -0,0 +1,17 @@ +use Modern::Perl; + +return { + bug_number => 28688, + description => "Add notice MEMBERSHIP_RENEWED", + 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`, `content`, `message_transport_type`, `lang`) +VALUES ( 'members', 'MEMBERSHIP_RENEWED', '', 'Account renewal', 0, 'Account renewal', "[%- USE Price -%]\nDear [% borrower.title %] [% borrower.firstname %] [% borrower.surname %],\n\nYour library account has been renewed. The new expiry date is: [% borrower.dateexpiry %].\n\n[% IF borrower.category.enrolmentfee > 0 %]An enrollment fee of [% borrower.category.enrolmentfee | $Price with_symbol => 1 %] has been applied.\n\n[% END %]Thank you,\n\nYour library,\n\n[% branch.branchname %]", 'email', 'default' ) + } + ); + }, +}; diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml index 2fcaacb3e6..7a65191e07 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.yml +++ b/installer/data/mysql/en/mandatory/sample_notices.yml @@ -1300,6 +1300,26 @@ tables: - "" - "<>" + - module: members + code: MEMBERSHIP_RENEWED + branchcode: "" + name: "Account renewal" + is_html: 0 + title: "Account renewal" + message_transport_type: email + lang: default + content: + - "[%- USE Price -%]" + - "Dear [% borrower.title %] [% borrower.firstname %] [% borrower.surname %]," + - "" + - "Your library account has been renewed. The new expiry date is: [% borrower.dateexpiry %]." + - "[% IF borrower.category.enrolmentfee > 0 %]\nAn enrollment fee of [% borrower.category.enrolmentfee | $Price with_symbol => 1 %] has been applied.\n[% END %]" + - "Thank you," + - "" + - "Your library," + - "" + - "[% branch.branchname %]" + - module: members code: OPAC_REG_VERIFY branchcode: "" -- 2.39.5