From d2cbcc5451b12f27aeb047a09bf19de2d0c92879 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Mon, 26 Jan 2026 18:31:17 +0000 Subject: [PATCH] Bug 30295: (follow-up) Merge database updates into one file with success messages Signed-off-by: Katrin Fischer --- ...pl => bug_30295-add_RECALL_MANUAL_CANCEL.pl} | 17 ++++++++++++++++- ...d_RECALL_MANUAL_CANCEL_message_attributes.pl | 14 -------------- ...d_RECALL_MANUAL_CANCEL_message_transports.pl | 14 -------------- 3 files changed, 16 insertions(+), 29 deletions(-) rename installer/data/mysql/atomicupdate/{bug_30295-add_RECALL_MANUAL_CANCEL_notice.pl => bug_30295-add_RECALL_MANUAL_CANCEL.pl} (53%) delete mode 100755 installer/data/mysql/atomicupdate/bug_30295-add_RECALL_MANUAL_CANCEL_message_attributes.pl delete mode 100755 installer/data/mysql/atomicupdate/bug_30295-add_RECALL_MANUAL_CANCEL_message_transports.pl diff --git a/installer/data/mysql/atomicupdate/bug_30295-add_RECALL_MANUAL_CANCEL_notice.pl b/installer/data/mysql/atomicupdate/bug_30295-add_RECALL_MANUAL_CANCEL.pl similarity index 53% rename from installer/data/mysql/atomicupdate/bug_30295-add_RECALL_MANUAL_CANCEL_notice.pl rename to installer/data/mysql/atomicupdate/bug_30295-add_RECALL_MANUAL_CANCEL.pl index d9fb2f9d645..e248dd8fd1e 100755 --- a/installer/data/mysql/atomicupdate/bug_30295-add_RECALL_MANUAL_CANCEL_notice.pl +++ b/installer/data/mysql/atomicupdate/bug_30295-add_RECALL_MANUAL_CANCEL.pl @@ -1,12 +1,24 @@ use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_success say_info); return { bug_number => "30295", - description => "Add RECALL_MANUAL_CANCEL email and sms notice", + description => "Adding message transports for RECALL_MANUAL_CANCEL notice", up => sub { my ($args) = @_; my ( $dbh, $out ) = @$args{qw(dbh out)}; + $dbh->do( + q{ INSERT IGNORE INTO message_attributes (message_attribute_id, message_name, takes_days) VALUES (14, 'Recall_Cancelled', 0) } + ); + + say_success( $out, "Added RECALL_MANUAL_CANCEL to message_attributes" ); + + $dbh->do( + q{ INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code, branchcode) VALUES (14, "email", 0, "circulation", "RECALL_MANUAL_CANCEL", null), (14, "sms", 0, "circulation", "RECALL_MANUAL_CANCEL", null), (14, "phone", 0, "circulation", "RECALL_MANUAL_CANCEL", null) } + ); + say_success( $out, "Added RECALL_MANUAL_CANCEL to message_transports" ); + $dbh->do( q{ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES ('circulation','RECALL_MANUAL_CANCEL','','Recall has been cancelled','0','Recall has been cancelled','Dear [% borrower.firstname %] [% borrower.surname %], @@ -22,5 +34,8 @@ Title: [% biblio.title %] Author: [% biblio.author %] Location: [% branch.branchname %]','email') } ); + + say_success( $out, "Added new notice RECALL_MANUAL_CANCEL" ); + }, }; diff --git a/installer/data/mysql/atomicupdate/bug_30295-add_RECALL_MANUAL_CANCEL_message_attributes.pl b/installer/data/mysql/atomicupdate/bug_30295-add_RECALL_MANUAL_CANCEL_message_attributes.pl deleted file mode 100755 index 2bf5ae20312..00000000000 --- a/installer/data/mysql/atomicupdate/bug_30295-add_RECALL_MANUAL_CANCEL_message_attributes.pl +++ /dev/null @@ -1,14 +0,0 @@ -use Modern::Perl; - -return { - bug_number => "30295", - description => "Adding message attributes for RECALL_MANUAL_CANCEL", - up => sub { - my ($args) = @_; - my ( $dbh, $out ) = @$args{qw(dbh out)}; - - $dbh->do( - q{ INSERT IGNORE INTO message_attributes (message_attribute_id, message_name, takes_days) VALUES (14, 'Recall_Cancelled', 0) } - ); - }, -}; diff --git a/installer/data/mysql/atomicupdate/bug_30295-add_RECALL_MANUAL_CANCEL_message_transports.pl b/installer/data/mysql/atomicupdate/bug_30295-add_RECALL_MANUAL_CANCEL_message_transports.pl deleted file mode 100755 index a3955f5e4c9..00000000000 --- a/installer/data/mysql/atomicupdate/bug_30295-add_RECALL_MANUAL_CANCEL_message_transports.pl +++ /dev/null @@ -1,14 +0,0 @@ -use Modern::Perl; - -return { - bug_number => "30295", - description => "Adding message transports for RECALL_MANUAL_CANCEL notice", - up => sub { - my ($args) = @_; - my ( $dbh, $out ) = @$args{qw(dbh out)}; - - $dbh->do( - q{ INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code, branchcode) VALUES (14, "email", 0, "circulation", "RECALL_MANUAL_CANCEL", null), (14, "sms", 0, "circulation", "RECALL_MANUAL_CANCEL", null), (14, "phone", 0, "circulation", "RECALL_MANUAL_CANCEL", null) } - ); - }, -}; -- 2.39.5