Bug 37967: Allow auto renewals notices to be sent via phone

Auto renewals via phone are only disallowed because itiva did not support them.
There is no reason to disallow auto-reneals for the generic phone transport.
Twilio, for example, would have no problem sending those phone notices.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Note you can now select phone for auto-renewals!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Kyle M Hall 2024-09-19 14:31:56 -04:00 committed by Martin Renvoize
parent 35111fcf39
commit 396355b9fe
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
2 changed files with 24 additions and 0 deletions

View File

@ -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: $_" );
};
},
};

View File

@ -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'),