Bugzilla – Attachment 3304 Details for
Bug 5867
"Hold filled" notice not sent by email if the user has its email address in a field other than "email"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PATCH] Improved the email checking when sending "Hold filled" notices.
0001-Improved-the-email-checking-when-sending-Hold-fille.patch (text/plain), 1.76 KB, created by
Frédérick Capovilla
on 2011-03-15 15:42:37 UTC
(
hide
)
Description:
[PATCH] Improved the email checking when sending "Hold filled" notices.
Filename:
MIME Type:
Creator:
Frédérick Capovilla
Created:
2011-03-15 15:42:37 UTC
Size:
1.76 KB
patch
obsolete
>From 9a176f02a557db58d0f3a7f5070ddec684be0b9f Mon Sep 17 00:00:00 2001 >From: =?utf-8?q?Fr=C3=A9d=C3=A9rick=20Capovilla?= <frederick.capovilla@sys-tech.net> >Date: Tue, 15 Mar 2011 11:16:48 -0400 >Subject: [PATCH] Improved the email checking when sending "Hold filled" notices. > >The subroutine for sending HOLD and HOLD_PRINT notices only checked the >"email" field of the borrowers table and didn't check the value of the >AutoEmailPrimaryAddress preference. With this patch, "Hold filled" >notices can now be sent using the other email addresses of the member. >--- > C4/Reserves.pm | 13 ++++++++++++- > 1 files changed, 12 insertions(+), 1 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 2dd2688..95b9ac5 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -1656,10 +1656,21 @@ sub _koha_notify_reserve { > > my $dbh = C4::Context->dbh; > my $borrower = C4::Members::GetMember(borrowernumber => $borrowernumber); >+ >+ # Try to get the borrower's email address >+ my $to_address; >+ my $which_address = C4::Context->preference('AutoEmailPrimaryAddress'); >+ # If the system preference is set to 'first valid' (value == OFF), look up email address >+ if ($which_address eq 'OFF') { >+ $to_address = C4::Members::GetFirstValidEmailAddress( $borrowernumber ); >+ } else { >+ $to_address = $borrower->{$which_address}; >+ } >+ > my $letter_code; > my $print_mode = 0; > my $messagingprefs; >- if ( $borrower->{'email'} || $borrower->{'smsalertnumber'} ) { >+ if ( $to_address || $borrower->{'smsalertnumber'} ) { > $messagingprefs = C4::Members::Messaging::GetMessagingPreferences( { borrowernumber => $borrowernumber, message_name => 'Hold Filled' } ); > > return if ( !defined( $messagingprefs->{'letter_code'} ) ); >-- >1.5.6.5 >
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 5867
:
3304
|
4302