Bugzilla – Attachment 63487 Details for
Bug 18478
Some notices sent via SMS gateway fail
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18478 - Hold Notices sent via SMS gateway fail
Bug-18478---Hold-Notices-sent-via-SMS-gateway-fail.patch (text/plain), 2.11 KB, created by
Nick Clemens (kidclamp)
on 2017-05-16 15:02:33 UTC
(
hide
)
Description:
Bug 18478 - Hold Notices sent via SMS gateway fail
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-05-16 15:02:33 UTC
Size:
2.11 KB
patch
obsolete
>From 395efee0eca141d24938147396ad31ad9bd6dd1f Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 16 May 2017 10:53:00 -0400 >Subject: [PATCH] Bug 18478 - Hold Notices sent via SMS gateway fail > >It seems that for HOLD notices we rely on >C4::Letters::SendQueuedMessages >to populate the correct address. > >The sms code in this sub, however, assumed the smsalertnumebr is >populated. > >Ths patch changes C4::Reserves::_koha_notify_reserve to use >C4::Message::enqueue >for SMS and email messages in order to ensure the correct addrress is >populated > >To test: > 1 - Define a messaging prefs for a patron to recieve hold notices via >SMS > 2 - Ensure you have defined an SMS message for 'HOLD' letter > 3 - Set an SMS alert number for patron > 4 - Set the SMS::Send driver to 'Email' > 5 - Fill a hold for the patron > 6 - Check the db and note the address is null > 7 - Apply patch > 8 - Fill another hold > 9 - Check db and note address is populated >10 - Repeat for email notices and see the same change >--- > C4/Reserves.pm | 18 +++++++++++------- > 1 file changed, 11 insertions(+), 7 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 7e24ff4..f96a214 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -1883,13 +1883,17 @@ sub _koha_notify_reserve { > warn "Could not find a letter called '$letter_params{'letter_code'}' for $mtt in the 'reserves' module"; > return; > } >- >- C4::Letters::EnqueueLetter( { >- letter => $letter, >- borrowernumber => $borrowernumber, >- from_address => $admin_email_address, >- message_transport_type => $mtt, >- } ); >+ if ( $mtt eq 'sms' || $mtt eq 'email' ) { >+ C4::Message->enqueue($letter,$borrower,$mtt); >+ } >+ else { >+ C4::Letters::EnqueueLetter( { >+ letter => $letter, >+ borrowernumber => $borrowernumber, >+ from_address => $admin_email_address, >+ message_transport_type => $mtt, >+ } ); >+ } > }; > > while ( my ( $mtt, $letter_code ) = each %{ $messagingprefs->{transports} } ) { >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18478
:
63487
|
63488
|
63504
|
63505
|
63506
|
63674
|
63675
|
63734
|
63735
|
63736
|
63737
|
63738
|
63983
|
63984
|
63985