Koha/koha-tmpl/intranet-tmpl/prog/en/modules/admin
Alex Buckley 3f7b2fa418 Bug 21241: (follow-up) Syspref to control fallback to SMS when no email is defined
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>
2019-01-28 11:42:31 +00:00
..
preferences Bug 21241: (follow-up) Syspref to control fallback to SMS when no email is defined 2019-01-28 11:42:31 +00:00
searchengine/elasticsearch Bug 19893: Add index status 2018-11-16 11:04:57 +00:00
admin-home.tt Bug 17047: Add a third option for Mana system preference 2019-01-23 14:39:26 +00:00
aqbudgetperiods.tt Bug 22007: Generated with add_missing_filters.pl 2019-01-02 20:43:53 +00:00
aqbudgets.tt Bug 22007: Generated with add_missing_filters.pl 2019-01-02 20:43:53 +00:00
aqcontract.tt Bug 21526: Use the 'url' filter when needed 2018-11-12 16:35:43 -03:00
aqplan.tt Bug 21526: uri escape TT variables when used in 'a href' 2018-10-26 17:09:57 +00:00
audio_alerts.tt Bug 20736: Update two-column templates with Bootstrap grid, Administration part 1 2018-08-30 13:40:32 +00:00
auth_subfields_structure.tt Bug 21706: (QA follow-up) Fix tabs 2018-11-12 16:39:57 -03:00
auth_tag_structure.tt Bug 21706: (follow-up) remove unused template params 2018-11-12 16:39:04 -03:00
authorised_values.tt Bug 21803: Redesign authorized values interface 2019-01-11 13:02:12 +00:00
authtypes.tt Bug 21526: uri escape TT variables when used in 'a href' 2018-10-26 17:09:57 +00:00
biblio_framework.tt Bug 21526: uri escape TT variables when used in 'a href' 2018-10-26 17:09:57 +00:00
branch_transfer_limits.tt Bug 21526: uri escape TT variables when used in 'a href' 2018-10-26 17:09:57 +00:00
branches.tt Bug 21526: Use the 'url' filter when needed 2018-11-12 16:35:43 -03:00
categories.tt Bug 22007: Generated with add_missing_filters.pl 2019-01-02 20:43:53 +00:00
checkmarc.tt Bug 20739: Update two-column templates with Bootstrap grid, Administration part 3 2018-08-30 13:40:33 +00:00
cities.tt Bug 20739: Update two-column templates with Bootstrap grid, Administration part 3 2018-08-30 13:40:33 +00:00
classsources.tt Bug 15836: (follow-up) Fix display input in any situations 2018-11-13 15:18:24 +00:00
clone-rules.tt Bug 20739: Update two-column templates with Bootstrap grid, Administration part 3 2018-08-30 13:40:33 +00:00
columns_settings.tt Bug 21216: Add filter/search options to notices table 2018-10-24 13:38:48 +00:00
currency.tt Bug 20740: Update two-column templates with Bootstrap grid, Administration part 4 2018-08-30 13:40:34 +00:00
didyoumean.tt Bug 20740: Update two-column templates with Bootstrap grid, Administration part 4 2018-08-30 13:40:34 +00:00
edi_accounts.tt Bug 21526: uri escape TT variables when used in 'a href' 2018-10-26 17:09:57 +00:00
edi_ean_accounts.tt Bug 21417: (QA follow-up) Display default EAN as such in admin display 2018-10-09 11:54:08 +00:00
fieldmapping.tt Bug 20741: Update two-column templates with Bootstrap grid: Administration part 5 2018-09-06 12:18:32 +00:00
item_circulation_alerts.tt Bug 21672: Switch templates to Bootstrap grid: Various 2019-01-25 17:41:37 +00:00
items_search_field.tt Bug 20740: Update two-column templates with Bootstrap grid, Administration part 4 2018-08-30 13:40:34 +00:00
items_search_fields.tt Bug 20740: Update two-column templates with Bootstrap grid, Administration part 4 2018-08-30 13:40:34 +00:00
itemtypes.tt Bug 21526: uri escape TT variables when used in 'a href' 2018-10-26 17:09:57 +00:00
koha2marclinks.tt Bug 20741: Update two-column templates with Bootstrap grid: Administration part 5 2018-09-06 12:18:32 +00:00
library_groups.tt Bug 21645: Fix focus when modal is shown 2018-11-05 14:41:10 +00:00
localization.tt Bug 21736: Allow translating the localization widget messages 2018-11-29 18:37:26 +00:00
marc_subfields_structure.tt Bug 21740: Show @ when editing fixed-length fields on bibliographic frameworks 2018-11-05 14:41:03 +00:00
marctagstructure.tt Bug 21526: (follow-up) Use the 'url' filter when needed 2018-11-12 16:35:44 -03:00
matching-rules.tt Bug 21526: Use the 'url' filter when needed 2018-11-12 16:35:43 -03:00
oai_set_mappings.tt Bug 20742: Update two-column templates with Bootstrap grid: Administration part 6 2018-09-06 12:43:20 +00:00
oai_sets.tt Bug 21526: uri escape TT variables when used in 'a href' 2018-10-26 17:09:57 +00:00
overdrive.tt Bug 21082: (RM follow-up) address QA issues 2018-10-09 11:04:24 +00:00
patron-attr-types.tt Bug 21526: Use the 'url' filter when needed 2018-11-12 16:35:43 -03:00
preferences.tt Bug 17047: add a dedicated page for Mana setup 2019-01-23 14:39:26 +00:00
printers.tt Bug 21526: Use the 'url' filter when needed 2018-11-12 16:35:43 -03:00
share_content.tt Bug 17047: Add a third option for Mana system preference 2019-01-23 14:39:26 +00:00
smart-rules.tt Bug 21491: Display 'Yes' as selected if no refundlostitemfee rules are set 2019-01-18 20:16:43 +00:00
sms_providers.tt Bug 20743: Update two-column templates with Bootstrap grid: Administration part 7 2018-09-06 16:54:06 +00:00
sru_modmapping.tt Bug 21647: Clean up SRU fields mapping templates 2018-11-06 17:01:44 +00:00
sru_modmapping_auth.tt Bug 21647: Clean up SRU fields mapping templates 2018-11-06 17:01:44 +00:00
systempreferences.tt Bug 21526: Use the 'url' filter when needed 2018-11-12 16:35:43 -03:00
transport-cost-matrix.tt Bug 21279: Fix &nbsp; in transport cost matrix 2018-10-15 13:08:04 +00:00
usage_statistics.tt Bug 21526: Use the 'url' filter when needed 2018-11-12 16:35:43 -03:00
z3950servers.tt Bug 21526: uri escape TT variables when used in 'a href' 2018-10-26 17:09:57 +00:00