From fe5e2f8a2dd1dd591afe1444ba5f8302da45234d Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 19 Sep 2024 14:31:56 -0400 Subject: [PATCH] Bug 37967 - Allow auto renewals notices to be sent via phone --- .../data/mysql/atomicupdate/bug_37967.pl | 22 +++++++++++++++++++ .../sample_notices_message_transports.sql | 2 ++ 2 files changed, 24 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_37967.pl diff --git a/installer/data/mysql/atomicupdate/bug_37967.pl b/installer/data/mysql/atomicupdate/bug_37967.pl new file mode 100755 index 00000000000..9e08f9bcc76 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_37967.pl @@ -0,0 +1,22 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_failure say_success say_info); + +return { + bug_number => "BUG_NUMBER", + description => "A single line description", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + try { + $dbh->do(q{ + INSERT IGNORE INTO message_transports (`message_attribute_id`, `message_transport_type`, `is_digest`, `letter_module`, `letter_code`) VALUES + (9, 'phone', 1, 'circulation', 'AUTO_RENEWALS_DGST'), + (9, 'phone', 0, 'circulation', 'AUTO_RENEWALS'); + }); + say_success( $out, "Added phone messaging transports for auto-renewals" ); + } catch { + say_failure( $out, "Error adding phone messaging transports for auto-renewals: $_" ); + }; + }, +}; diff --git a/installer/data/mysql/mandatory/sample_notices_message_transports.sql b/installer/data/mysql/mandatory/sample_notices_message_transports.sql index 977e59f5eae..762fdb7ee50 100644 --- a/installer/data/mysql/mandatory/sample_notices_message_transports.sql +++ b/installer/data/mysql/mandatory/sample_notices_message_transports.sql @@ -36,8 +36,10 @@ values (8, 'phone', 0, 'ill', 'ILL_REQUEST_UNAVAIL'), (9, 'email', 0, 'circulation', 'AUTO_RENEWALS'), (9, 'sms', 0, 'circulation', 'AUTO_RENEWALS'), +(9, 'phone', 0, 'circulation', 'AUTO_RENEWALS'), (9, 'email', 1, 'circulation', 'AUTO_RENEWALS_DGST'), (9, 'sms', 1, 'circulation', 'AUTO_RENEWALS_DGST'), +(9, 'phone', 1, 'circulation', 'AUTO_RENEWALS_DGST'), (10, 'email', 0, 'circulation', 'HOLD_REMINDER'), (10, 'sms', 0, 'circulation', 'HOLD_REMINDER'), (10, 'phone', 0, 'circulation', 'HOLD_REMINDER'), -- 2.39.5 (Apple Git-154)