https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42645
Bug ID: 42645
Summary: ModSuggestion: FallbackToSMSIfNoEmail ignores
EmailFieldPrimary/EmailFieldPrecedence
Initiative type: ---
Sponsorship ---
status:
Product: Koha
Version: Main
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P5 - low
Component: Acquisitions
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
The transport-selection logic in C4/Suggestions.pm (ModSuggestion, ~line 253)
checks !$patron->email when deciding whether to fall back to SMS for
purchase-suggestion status-change notices (ACCEPTED, AVAILABLE, REJECTED,
ORDERED, CHECKED). $patron->email returns the raw borrowers.email column
value and does not consult the EmailFieldPrimary or EmailFieldPrecedence
system preferences.
The correct method is $patron->notice_email_address, which applies those
preferences. A patron who has only emailpro or B_email populated (with
borrowers.email empty) will incorrectly receive their status-change notice
via SMS even when they have a valid, reachable email address, because the
FallbackToSMSIfNoEmail check sees an empty borrowers.email and treats the
patron as having no email at all.
See also: Bug 39984
Test plan:
1. Enable FallbackToSMSIfNoEmail.
2. Set EmailFieldPrimary to emailpro (or EmailFieldPrecedence to
emailpro|email|B_email).
3. Create a patron with emailpro populated, borrowers.email empty, and
smsalertnumber set.
4. Submit a purchase suggestion as that patron and accept it.
5. Check the message_queue table.
6. Without patch: the ACCEPTED notice is queued with message_transport_type =
'sms'.
7. Apply patch: the ACCEPTED notice is queued with message_transport_type =
'email' and sent to the emailpro address.
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/