Alex Buckley
3f7b2fa418
This patch adds a new system preference (FallbackToSMSIfNoEmail) which if enabled Koha will send suggestion notices by SMS if a borrower has a defined SMSalertnumber and no email. The use of the syspref prevents automatic fallback to sending suggestion notices as SMS when there's no defined email. Test plan: 1. Chose a patron who has no email address set, but does have a smsalertnumber set (this value is set in the Patron messaging preferences section after the SMSSendDriver syspref is set) 2. Log into the OPAC with that user and submit a suggestion 3. In the staff client go to Acquisitions->Suggestions and tick the suggestion and set its status to 'Accepted' 4. In the database query the message_queue and notice the message_transport_type of the message is set to 'email' even though the patron has no email address set. 5. Apply patches, restart memcached and plack 6. Check the 'FallbackToSMSIfNoEmail' syspref is disabled 7. Repeat steps 2,3 and observe in the message_queue table the message_transport_type = 'email' i.e. If the syspref is disabled then the message is still sent by email to borrowers with defined smsalertnumber and no email address 8. Enable the 'FallbackToSMSIfNoEmail' syspref and repeat steps 2,3 and notice the message_transport_type = 'sms' i.e. If the syspref is enabled then the message is sent by sms to borrowers with defined smsalertnumber and no email address 9. Repeat steps 2,3 with a patron with an email address and no smsalertnumber trying with the 'FallbackToSMSIfNoEmail' syspref enabled and disabled and notice in both cases the message_transport_type = email. i.e. If a borrower has an email address defined the suggestion notice will always be sent via email 10. Repeat steps 2,3 with a patron with no email or smsalertnumber trying with the 'FallbackToSMSIfNoEmail' syspref enabled and disabled and notice in both cases the message_transport_type = email i.e. If the borrower has no smsalertnumber and no email defined then the suggestion notice will be sent by 'email' 11. Run t/db_dependent/Suggestions.t Sponsored-By: Brimbank Libraries, Australia Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Bug 21241: (follow-up) Renamed system preference Sponsored-By: Brimbank Library, Australia Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> |
||
---|---|---|
.. | ||
Acquisition | ||
Biblio | ||
Budgets | ||
Circulation | ||
db_dependent | ||
edi_testfiles | ||
etc | ||
External | ||
Koha | ||
LangInstaller/templates | ||
lib | ||
Members | ||
Number | ||
Search | ||
Serials | ||
SIP | ||
Test | ||
00-checkdatabase-version.t | ||
00-deprecated.t | ||
00-load.t | ||
00-merge-conflict-markers.t | ||
00-testcritic.t | ||
00-valid-xml.t | ||
Auth_with_shibboleth.t | ||
AuthoritiesMarc_MARC21.t | ||
AuthoritiesMarc_UNIMARC.t | ||
AuthUtils.t | ||
Barcodes_annual.t | ||
Barcodes_EAN13.t | ||
Barcodes_hbyymmincr.t | ||
Barcodes_incremental.t | ||
Biblio.t | ||
Biblio2.t | ||
Bookseller.t | ||
Boolean.t | ||
Budgets.t | ||
Cache.t | ||
Calendar.t | ||
Charset.t | ||
Circulation_barcodedecode.t | ||
ClassSortRoutine.t | ||
ClassSortRoutine_Dewey.t | ||
ClassSortRoutine_Generic.t | ||
ClassSortRoutine_LCC.t | ||
ClassSource.t | ||
Context.t | ||
Contract.t | ||
Creators.t | ||
DateUtils.t | ||
Debug.t | ||
dummy.t | ||
Edifact.t | ||
EdiInvoice.t | ||
Ediorder.t | ||
Ediordrsp.t | ||
Form_MessagingPreferences.t | ||
HtmlTags.t | ||
Images.t | ||
ImportBatch.t | ||
Installer_PerlDependencies.t | ||
Installer_PerlModules.t | ||
Installer_pm.t | ||
ItemCirculationAlertPreference.t | ||
Koha.t | ||
Koha_Email.t | ||
Koha_MetadataRecord.t | ||
Koha_Template_Plugin_Cache.t | ||
Koha_Template_Plugin_Koha.t | ||
Koha_Util_FrameworkPlugin.t | ||
Koha_Util_MARC.t | ||
Labels.t | ||
Labels_split_ccn.t | ||
Labels_split_ddcn.t | ||
Labels_split_lccn.t | ||
Labels_split_Regex.t | ||
LangInstaller.t | ||
Languages.t | ||
Letters.t | ||
Log.t | ||
Logger.t | ||
Makefile.t | ||
Matcher.t | ||
Members_Attributes.t | ||
Members_AttributeTypes.t | ||
Members_Messaging.t | ||
OpenLibrarySearch.t | ||
Output.t | ||
Output_JSONStream.t | ||
Patron.t | ||
Patroncards.t | ||
Patroncards_Batch.t | ||
Patroncards_Layout.t | ||
Patroncards_Lib.t | ||
Patroncards_Patroncard.t | ||
Patroncards_Profile.t | ||
Patroncards_Template.t | ||
perlcriticrc | ||
Prices.t | ||
Print.t | ||
QueryParser.t | ||
RecordProcessor.t | ||
Ris.t | ||
Scheduler.t | ||
Scrubber.t | ||
Search.t | ||
Search_PazPar2.t | ||
SimpleMARC.t | ||
SMS.t | ||
SocialData.t | ||
Stats.t | ||
SuggestionEngine.t | ||
SuggestionEngine_AuthorityFile.t | ||
template_filters.t | ||
timezones.t | ||
TmplToken.t | ||
Token.t | ||
XSLT.t |