[Koha-bugs] [Bug 21781] message_transport_type should allow fallbacks

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Sep 2 23:20:54 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21781

--- Comment #7 from Alex Buckley <alexbuckley at catalyst.net.nz> ---
Created attachment 109559
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109559&action=edit
Bug 21781: Fallback to SMS if no email address where email address hardcoded

Extend use of FallbackToSMSIfNoEmail syspref to fallback to SMS if no
patron email address outside of it's current usage sending suggestion
notices.

Test plan for C4/Acquisition.pm:
1. Input a value into SMSSendDriver syspref
2. Create a patron with sms (under Member messaging preferences) and no email
address
3. In Acquistions module make currency, active budget, fund, vendor
4. Create a basket
5. Add to basket. Click to add 'From a new (empty) record'
6. Under 'Patrons' header add a user and search for your patron (added
in #1)
7. Submit new order
8. Receive the order:
'Close this basket'
'Receive shipment'
Submit invoice page
Select 'Receive' link on right hand side of page
Tick checkbox to add 1 quantity of item and Save
9. Revisit your patrons page and in the 'Notices' tab you'll see a
'Order received' notice with type of 'email'
11. Apply patch and restart plack
12. Repeat steps 4-9 and observe the 'Order received' notice has a type
of SMS

Test plan for amendment to circ/pendingreserves.pl (patch has been
applied in 'Test plan for C4/Acquisition.pm):
1. Set 'FallbackToSMSIfNoEmail' syspref to 'Disable'
2. Set CanMarkHoldsToPullAsLost  syspref to 'Allow to mark items as lost
and notify the patron'
3. Using the patron from test plan for C4/Acquisitions.pm (i.e. sms alert
number and no email) place a hold on an item currently available
4. Visit Circulation > Holds to pull
5. Select 'Mark lost and notify patron'
6. Return to patron page look in 'Notices' tab and observe 'Hold has
been cancelled' notice has type of 'email'
7. Change 'FallbackToSMSIfNoEmail' to 'Enable' and repeat steps 3,4,5,6
and observe the new 'Hold has been cancelled' notice has type 'sms'

Test plan for amendment to misc/cronjobs/automatic_renewals.pl (patch
has been applied already):
1. Set 'FallbackToSMSIfNoEmail' syspref to 'Disable'
2. Enable automatic renewals in Administration > Circulation and fine
rules
3. Checkout an item to our patron and set due date in the past
4. cd into misc/cronjobs
5. Jump into koha-shell and run automatic_renewals.pl cronjob
sudo koha-shell <instancename>
./automatic_renewals.pl --confirm --send-notices
6. Observe in patron records 'Notices' tab there is a 'Auto renewals'
notice with type 'email'
7. Set 'FallbackToSMSIfNoEmail' syspref to 'Enable' and repeat steps
3,4,5,6 and observe the new 'Auto renewals' notice is type 'sms'

Test plan for amendment to misc/cronjobs/membership_expiry.pl (patch has
been applied already):
1. Set 'FallbackToSMSIfNoEmail' syspref to 'Disable'
2. Set 'MembershipExpiryDaysNotice' to '1'
3. Edit our patrons record setting 'Expiry date' to 1 day in future
4. cd to misc/cronjobs directory
5. Jump into koha-shell and run membership_expiry.pl cronjob:
sudo koha-shell <instancename>
./membership_expiry.pl -c
6. Visit the patron record's 'Notices' tab and observe 'Account
expiration' notice with type 'email'
7. Change 'FallbackToSMSIfNoEmail' syspref to 'Enable'
8. Reset patrons epxiration date to 1 day in future
9. Repeat step 4,5,6 and observe new 'Account expiration' notice is type
'sms'

Test plan for opac/opac-shareshelf.pl (patch has been applied already):
1. Set 'FallbackToSMSIfNoEmail' syspref to 'Disable'
2. Set 'OpacAllowSharingPrivateLists' syspref to 'Allow'
3. Ensure OPACBaseURL is set
4. In OPAC log in as the patron with set smsalertnumber and no email
5. Create a private list, select 'Share' link, input email
address and submit
6. Back in staff client make a new patron record
7. Return to OPAC and login as patron from step #5
8. Query database:
select content from message_queue where letter_code='SHARE_INVITE';
9. Click on the link in the message_queue notice
10. OPAC loads
11. Query database again:
select to_address, message_transport_type from
message_queue where letter_code='SHARE_ACCEPT';
12. Observe there is no 'Share on list <listname> accepted' notice
13. Set 'FallbackToSMSIfNoEmail' to 'Enable' and repeat steps 4,5,7,8,
9,10,11,12 and observe there is a 'Share on list <listname> accepted'
notice with to_address = smsalertnumber and message_transport_type is 'sms'

14. Set 'FallbackToSMSIfNoEmail' to 'disable' and edit the patron with
smsalertnumber set and no email setting an email address and repeat
steps 4,5,7,8,9,10,11,12 and observe there is a 'Share on list
<listname> accepted' notice with the to_address of the email you set and
message_transport_type of 'email'

Sponsored-by: Catalyst IT

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list