Summary: | Send WELCOME notices by SMS | ||
---|---|---|---|
Product: | Koha | Reporter: | Julian Maurice <julian.maurice> |
Component: | Patrons | Assignee: | Julian Maurice <julian.maurice> |
Status: | Signed Off --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | gmcharlt, kyle.m.hall, kyle, lucas |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 33221: Send WELCOME notices by sms too
Bug 33221: Send WELCOME notices by sms too Bug 33221: Send WELCOME notices by sms too Bug 33221: Send WELCOME notices by sms too Bug 33221: Send WELCOME notices by sms too Bug 33221: Send WELCOME notices by sms too Bug 33221: Send WELCOME notices by sms too Bug 33221: (QA follow-up) Tidy code Bug 33221: (QA follow-up) Fix up unit tests |
Description
Julian Maurice
2023-03-14 07:08:13 UTC
Created attachment 148152 [details] [review] Bug 33221: Send WELCOME notices by sms too This affects patron creation from staff and OPAC interfaces, and also when patrons are imported by misc/import_patrons.pl Since it's not possible at the moment to provide an SMS number when creating an account from OPAC, the changes at OPAC will only be useful once that possibility is added (see bug 20859) Test plan: 1. Enable system preference AutoEmailNewUser 2. Set system preference SMSSendDriver to 'Test' 3. Verify in "About" page that SMS::Send is installed 4. In "Notices and Slips" tool, edit the 'WELCOME' letter and verify that both email and sms parts are filled. Use a different title and body for the sms part 5. Create a new borrower with an email address and an SMS number 6. Verify in the "Notices" tab that two notices are pending, one for email, one for sms 7. Click on "Send welcome email" in the "More" menu 8. Verify that two new notices have been queued (like in step 6) 9. Create a 'borrowers.csv' file with the following content: cardnumber,surname,categorycode,branchcode,email,smsalertnumber foo,Foo,PT,CPL,foo@example.com,+33123456789 10. Import it with the following command misc/import_patrons.pl -v -c -m cardnumber -f borrowers.csv --email-new 11. Verify that the patron has been imported and that two new notices have been queued (like in step 6) 12. Enable system preference PatronSelfRegistration and disable system preference PatronSelfRegistrationVerifyByEmail 13. Go to OPAC and register a new account with an email address 14. Verify that the email notice was queued 15. Enable PatronSelfRegistrationVerifyByEmail 16. Go to OPAC and register a new account with an email address. Go through the verification process 17. Verify that the email notice was queued Sponsored-by: Médiathèque de Montauban There seems to be some errors in memberentry.pl and opac-memberentry.pl: FAIL members/memberentry.pl FAIL valid Missing right curly or square bracket syntax error members/memberentry.pl had compilation errors. FAIL opac/opac-memberentry.pl FAIL valid "my" variable $cgi masks earlier declaration in same statement "my" variable %borrower masks earlier declaration in same scope "my" variable @empty_mandatory_fields masks earlier declaration in same scope "my" variable $invalidformfields masks earlier declaration in same scope syntax error Can't redeclare "my" in "my" Type of arg 1 to List::MoreUtils::XS::any must be block or sub {} (not reference constructor) Type of arg 1 to List::MoreUtils::XS::any must be block or sub {} (not reference constructor) Type of arg 1 to List::MoreUtils::XS::any must be block or sub {} (not reference constructor) Missing right curly or square bracket opac/opac-memberentry.pl had compilation errors. FAIL opac/opac-registration-verify.pl FAIL valid Missing right curly or square bracket syntax error opac/opac-registration-verify.pl had compilation errors. Created attachment 148251 [details] [review] Bug 33221: Send WELCOME notices by sms too This affects patron creation from staff and OPAC interfaces, and also when patrons are imported by misc/import_patrons.pl Since it's not possible at the moment to provide an SMS number when creating an account from OPAC, the changes at OPAC will only be useful once that possibility is added (see bug 20859) Test plan: 1. Enable system preference AutoEmailNewUser 2. Set system preference SMSSendDriver to 'Test' 3. Verify in "About" page that SMS::Send is installed 4. In "Notices and Slips" tool, edit the 'WELCOME' letter and verify that both email and sms parts are filled. Use a different title and body for the sms part 5. Create a new borrower with an email address and an SMS number 6. Verify in the "Notices" tab that two notices are pending, one for email, one for sms 7. Click on "Send welcome email" in the "More" menu 8. Verify that two new notices have been queued (like in step 6) 9. Create a 'borrowers.csv' file with the following content: cardnumber,surname,categorycode,branchcode,email,smsalertnumber foo,Foo,PT,CPL,foo@example.com,+33123456789 10. Import it with the following command misc/import_patrons.pl -v -c -m cardnumber -f borrowers.csv --email-new 11. Verify that the patron has been imported and that two new notices have been queued (like in step 6) 12. Enable system preference PatronSelfRegistration and disable system preference PatronSelfRegistrationVerifyByEmail 13. Go to OPAC and register a new account with an email address 14. Verify that the email notice was queued 15. Enable PatronSelfRegistrationVerifyByEmail 16. Go to OPAC and register a new account with an email address. Go through the verification process 17. Verify that the email notice was queued Sponsored-by: Médiathèque de Montauban (In reply to Lucas Gass from comment #2) > There seems to be some errors in memberentry.pl and opac-memberentry.pl: Bad conflict resolution... Sorry for that. All fixed in the latest patch. I am only able to get the SMS WELCOME notice to generate when I create a new patron in the staff interface. When using the 'Send WELCOME notice' button, or when I import a patron I am only seeing the email WELCOME notice. Looks like this one needs to be rebased. Created attachment 171712 [details] [review] Bug 33221: Send WELCOME notices by sms too This affects patron creation from staff and OPAC interfaces, and also when patrons are imported by misc/import_patrons.pl Since it's not possible at the moment to provide an SMS number when creating an account from OPAC, the changes at OPAC will only be useful once that possibility is added (see bug 20859) Test plan: 1. Enable system preference AutoEmailNewUser 2. Set system preference SMSSendDriver to 'Test' 3. Verify in "About" page that SMS::Send is installed 4. In "Notices and Slips" tool, edit the 'WELCOME' letter and verify that both email and sms parts are filled. Use a different title and body for the sms part 5. Create a new borrower with an email address and an SMS number 6. Verify in the "Notices" tab that two notices are pending, one for email, one for sms 7. Click on "Send welcome email" in the "More" menu 8. Verify that two new notices have been queued (like in step 6) 9. Create a 'borrowers.csv' file with the following content: cardnumber,surname,categorycode,branchcode,email,smsalertnumber foo,Foo,PT,CPL,foo@example.com,+33123456789 10. Import it with the following command misc/import_patrons.pl -v -c -m cardnumber -f borrowers.csv --email-new 11. Verify that the patron has been imported and that two new notices have been queued (like in step 6) 12. Enable system preference PatronSelfRegistration and disable system preference PatronSelfRegistrationVerifyByEmail 13. Go to OPAC and register a new account with an email address 14. Verify that the email notice was queued 15. Enable PatronSelfRegistrationVerifyByEmail 16. Go to OPAC and register a new account with an email address. Go through the verification process 17. Verify that the email notice was queued Sponsored-by: Médiathèque de Montauban Created attachment 172123 [details] [review] Bug 33221: Send WELCOME notices by sms too This affects patron creation from staff and OPAC interfaces, and also when patrons are imported by misc/import_patrons.pl Since it's not possible at the moment to provide an SMS number when creating an account from OPAC, the changes at OPAC will only be useful once that possibility is added (see bug 20859) Test plan: 1. Enable system preference AutoEmailNewUser 2. Set system preference SMSSendDriver to 'Test' 3. Verify in "About" page that SMS::Send is installed 4. In "Notices and Slips" tool, edit the 'WELCOME' letter and verify that both email and sms parts are filled. Use a different title and body for the sms part 5. Create a new borrower with an email address and an SMS number 6. Verify in the "Notices" tab that two notices are pending, one for email, one for sms 7. Click on "Send welcome email" in the "More" menu 8. Verify that two new notices have been queued (like in step 6) 9. Create a 'borrowers.csv' file with the following content: cardnumber,surname,categorycode,branchcode,email,smsalertnumber foo,Foo,PT,CPL,foo@example.com,+33123456789 10. Import it with the following command misc/import_patrons.pl -v -c -m cardnumber -f borrowers.csv --email-new 11. Verify that the patron has been imported and that two new notices have been queued (like in step 6) 12. Enable system preference PatronSelfRegistration and disable system preference PatronSelfRegistrationVerifyByEmail 13. Go to OPAC and register a new account with an email address 14. Verify that the email notice was queued 15. Enable PatronSelfRegistrationVerifyByEmail 16. Go to OPAC and register a new account with an email address. Go through the verification process 17. Verify that the email notice was queued Sponsored-by: Médiathèque de Montauban Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com> Created attachment 172126 [details] [review] Bug 33221: Send WELCOME notices by sms too This affects patron creation from staff and OPAC interfaces, and also when patrons are imported by misc/import_patrons.pl Since it's not possible at the moment to provide an SMS number when creating an account from OPAC, the changes at OPAC will only be useful once that possibility is added (see bug 20859) Test plan: 1. Enable system preference AutoEmailNewUser 2. Set system preference SMSSendDriver to 'Test' 3. Verify in "About" page that SMS::Send is installed 4. In "Notices and Slips" tool, edit the 'WELCOME' letter and verify that both email and sms parts are filled. Use a different title and body for the sms part 5. Create a new borrower with an email address and an SMS number 6. Verify in the "Notices" tab that two notices are pending, one for email, one for sms 7. Click on "Send welcome email" in the "More" menu 8. Verify that two new notices have been queued (like in step 6) 9. Create a 'borrowers.csv' file with the following content: cardnumber,surname,categorycode,branchcode,email,smsalertnumber foo,Foo,PT,CPL,foo@example.com,+33123456789 10. Import it with the following command misc/import_patrons.pl -v -c -m cardnumber -f borrowers.csv --email-new 11. Verify that the patron has been imported and that two new notices have been queued (like in step 6) 12. Enable system preference PatronSelfRegistration and disable system preference PatronSelfRegistrationVerifyByEmail 13. Go to OPAC and register a new account with an email address 14. Verify that the email notice was queued 15. Enable PatronSelfRegistrationVerifyByEmail 16. Go to OPAC and register a new account with an email address. Go through the verification process 17. Verify that the email notice was queued Sponsored-by: Médiathèque de Montauban Created attachment 172336 [details] [review] Bug 33221: Send WELCOME notices by sms too This affects patron creation from staff and OPAC interfaces, and also when patrons are imported by misc/import_patrons.pl Since it's not possible at the moment to provide an SMS number when creating an account from OPAC, the changes at OPAC will only be useful once that possibility is added (see bug 20859) Test plan: 1. Enable system preference AutoEmailNewUser 2. Set system preference SMSSendDriver to 'Test' 3. Verify in "About" page that SMS::Send is installed 4. In "Notices and Slips" tool, edit the 'WELCOME' letter and verify that both email and sms parts are filled. Use a different title and body for the sms part 5. Create a new borrower with an email address and an SMS number 6. Verify in the "Notices" tab that two notices are pending, one for email, one for sms 7. Click on "Send welcome email" in the "More" menu 8. Verify that two new notices have been queued (like in step 6) 9. Create a 'borrowers.csv' file with the following content: cardnumber,surname,categorycode,branchcode,email,smsalertnumber foo,Foo,PT,CPL,foo@example.com,+33123456789 10. Import it with the following command misc/import_patrons.pl -v -c -m cardnumber -f borrowers.csv --email-new 11. Verify that the patron has been imported and that two new notices have been queued (like in step 6) 12. Enable system preference PatronSelfRegistration and disable system preference PatronSelfRegistrationVerifyByEmail 13. Go to OPAC and register a new account with an email address 14. Verify that the email notice was queued 15. Enable PatronSelfRegistrationVerifyByEmail 16. Go to OPAC and register a new account with an email address. Go through the verification process 17. Verify that the email notice was queued Sponsored-by: Médiathèque de Montauban Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 172337 [details] [review] Bug 33221: Send WELCOME notices by sms too This affects patron creation from staff and OPAC interfaces, and also when patrons are imported by misc/import_patrons.pl Since it's not possible at the moment to provide an SMS number when creating an account from OPAC, the changes at OPAC will only be useful once that possibility is added (see bug 20859) Test plan: 1. Enable system preference AutoEmailNewUser 2. Set system preference SMSSendDriver to 'Test' 3. Verify in "About" page that SMS::Send is installed 4. In "Notices and Slips" tool, edit the 'WELCOME' letter and verify that both email and sms parts are filled. Use a different title and body for the sms part 5. Create a new borrower with an email address and an SMS number 6. Verify in the "Notices" tab that two notices are pending, one for email, one for sms 7. Click on "Send welcome email" in the "More" menu 8. Verify that two new notices have been queued (like in step 6) 9. Create a 'borrowers.csv' file with the following content: cardnumber,surname,categorycode,branchcode,email,smsalertnumber foo,Foo,PT,CPL,foo@example.com,+33123456789 10. Import it with the following command misc/import_patrons.pl -v -c -m cardnumber -f borrowers.csv --email-new 11. Verify that the patron has been imported and that two new notices have been queued (like in step 6) 12. Enable system preference PatronSelfRegistration and disable system preference PatronSelfRegistrationVerifyByEmail 13. Go to OPAC and register a new account with an email address 14. Verify that the email notice was queued 15. Enable PatronSelfRegistrationVerifyByEmail 16. Go to OPAC and register a new account with an email address. Go through the verification process 17. Verify that the email notice was queued Sponsored-by: Médiathèque de Montauban Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 172338 [details] [review] Bug 33221: (QA follow-up) Tidy code Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 172339 [details] [review] Bug 33221: (QA follow-up) Fix up unit tests Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> AutoEmailNewUser should be renamed to AutoMessageNewUser SMS message sending could be decoupled so it does not require an email welcome notice in order to send the sms welcome notice. |