From 678b875407c14d141e1353e9a78018aa686b0ee8 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 --- .../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..8cc975449d --- /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 enrollment_fee %]An enrollment fee of [% enrollment_fee | $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..40c712f00c 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 enrollment_fee %]\nAn enrollment fee of [% enrollment_fee | $Price with_symbol => 1 %] has been applied.\n[% END %]" + - "Thank you," + - "" + - "Your library," + - "" + - "[% branch.branchname %]" + - module: members code: OPAC_REG_VERIFY branchcode: "" -- 2.30.2