[Koha-bugs] [Bug 14590] Validate messaging preferences
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14590 Lari Taskula changed: What|Removed |Added Summary|Checkboxes should be|Validate messaging |disabled without valid |preferences |contact information in | |messaging preferences | -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://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/
[Koha-bugs] [Bug 14590] Validate messaging preferences
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14590 Lari Taskula changed: What|Removed |Added Attachment #62040|0 |1 is obsolete|| --- Comment #15 from Lari Taskula --- Created attachment 62043 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62043&action=edit Bug 14590: Validate messaging preferences Messaging preferences should be only available if a valid contact information is stored for the patron for that transport type. Otherwise, it should not be possible to select preferences for that transport type. For example, when attempting to set messages to be delivered via sms, we should automatically check patron's smsalertnumber before allowing this type of modification. If patron does not have a valid smsalertnumber and is not passing it along with the messaging preference change, we should not store those given messaging transport types. This patch implements exactly this. It uses Koha::Validation from Bug 14620 to validate contact informations and attaches it into patron modification logic - whenever messaging preferences are processed by Koha, preferences that link to an invalid or non-existent contact information will be removed. Client-side JavaScript checks are also implemented. When modifying patron information, messaging preferences for a certain transport type will be either enabled and/or disabled on the fly depending on validity of the contact info linked to that transport type (transport type "sms" => borrower "smsalertnumber"). TESTING: This feature requires tests both in OPAC and staff client. Requirements: 1. Apply patch(es) in Bug 14620 before this patch 2. Make sure EnhancedMessagingPreferences is enabled 3. Make sure EnhancedMessagingPreferencesOPAC is enabled 4. Make sure TalkingTechItivaPhoneNotification is enabled (activates transport type "phone") 5. Make sure SMSSendDriver is enabled (for simple testing purposes you can use the value "test") 6. Preference "ValidatePhoneNumber" needs a regular expression for validating phone numbers. An example regular expression is provided below the input field. You can use that while testing this feature. Copy-paste it into the input box and save preferences. (regex also provided below) ^((\+)?[1-9]{1,2})?([-\s\.])?((\(\d{1,4}\))|\d{1,4})(([-\s\.])?[0-9]{1,12}){1,2}$ TEST PLAN: 1. Login to staff client 2. Go to modification view of any patron 3. Scroll down all the way and you should see "Patron messaging preferences" table including checkboxes for transport types "SMS", "Phone" and "Email". 4. If the patron you are modifying has any contact information of the following "Primary email", "Primary phone", "SMS number", please clear those fields. 5. Scroll down. All checkboxes for the given transport types should now be disabled. 6. Modify field "Primary email" and insert "test". A warning of invalid email should appear. 7. Scroll down. Checkboxes for transport type "Email" should still be disabled. 8. Modify field "Primary email" and insert "nob...@example.com". 9. Scroll down. Checkboxes for transport type "Email" should now be enabled. 10. Select email as transport type for each message type and click "Save". 11. Go back to modification screen. The messaging preferences should still appear as you stored them. 12. Repeat steps 6-11 also for both "Phone" and "SMS number". When inserting text into phone number fields, they should appear as invalid, so test like that. 13. After successful testing, test also other patron modification screens. Go to patron's Details tab and you should see multiple "Edit" links on that page. The point is to make sure transport type selections are correctly removed from the patron if the modification screen lets you modify for example primary email, but does not present the messaging preferences at the bottom of the page. So, as an example, first insert patron a valid email and select all email transport types. Then, go to the "Edit" link right above "Patron messaging preferences" title on patron's details page. This page lets you modify "Primary email" but not messaging preferences. Clear the "Primary email" field and save, and observe that all previously selected email transport types are now removed. 14. Give your patron a valid email and go to Details tab -> "Edit" link below "Patron messaging preferences title" on the left. You should still be able to select email as transport types. 15. Go remove patron's primary email and repeat step 14. You will observe that it is no longer possible to select email as a transport type. 16. Try steps 13-15 with other transport types as well After this test plan you should have a pretty good idea of the feature. As mentioned earlier, this feature requires tests on the OPAC side
[Koha-bugs] [Bug 14590] Validate messaging preferences
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14590 --- Comment #16 from Lari Taskula --- Rebased on master & rewrote much of the patch and added a more detailed test plan. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://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/
[Koha-bugs] [Bug 14590] Validate messaging preferences
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14590 Lari Taskula changed: What|Removed |Added Attachment #62043|0 |1 is obsolete|| --- Comment #17 from Lari Taskula --- Created attachment 62044 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62044&action=edit Bug 14590: Validate messaging preferences Messaging preferences should be only available if a valid contact information is stored for the patron for that transport type. Otherwise, it should not be possible to select preferences for that transport type. For example, when attempting to set messages to be delivered via sms, we should automatically check patron's smsalertnumber before allowing this type of modification. If patron does not have a valid smsalertnumber and is not passing it along with the messaging preference change, we should not store those given messaging transport types. This patch implements exactly this. It uses Koha::Validation from Bug 14620 to validate contact informations and attaches it into patron modification logic - whenever messaging preferences are processed by Koha, preferences that link to an invalid or non-existent contact information will be removed. Client-side JavaScript checks are also implemented. When modifying patron information, messaging preferences for a certain transport type will be either enabled and/or disabled on the fly depending on validity of the contact info linked to that transport type (transport type "sms" => borrower "smsalertnumber"). TESTING: This feature requires tests both in OPAC and staff client. Requirements: 1. Apply patch(es) in Bug 14620 before this patch 2. Make sure EnhancedMessagingPreferences is enabled 3. Make sure EnhancedMessagingPreferencesOPAC is enabled 4. Make sure TalkingTechItivaPhoneNotification is enabled (activates transport type "phone") 5. Make sure SMSSendDriver is enabled (for simple testing purposes you can use the value "test") 6. Preference "ValidatePhoneNumber" needs a regular expression for validating phone numbers. An example regular expression is provided below the input field. You can use that while testing this feature. Copy-paste it into the input box and save preferences. (regex also provided below) ^((\+)?[1-9]{1,2})?([-\s\.])?((\(\d{1,4}\))|\d{1,4})(([-\s\.])?[0-9]{1,12}){1,2}$ TEST PLAN: 1. Login to staff client 2. Go to modification view of any patron 3. Scroll down all the way and you should see "Patron messaging preferences" table including checkboxes for transport types "SMS", "Phone" and "Email". 4. If the patron you are modifying has any contact information of the following "Primary email", "Primary phone", "SMS number", please clear those fields. 5. Scroll down. All checkboxes for the given transport types should now be disabled. 6. Modify field "Primary email" and insert "test". A warning of invalid email should appear. 7. Scroll down. Checkboxes for transport type "Email" should still be disabled. 8. Modify field "Primary email" and insert "nob...@example.com". 9. Scroll down. Checkboxes for transport type "Email" should now be enabled. 10. Select email as transport type for each message type and click "Save". 11. Go back to modification screen. The messaging preferences should still appear as you stored them. 12. Repeat steps 6-11 also for both "Phone" and "SMS number". When inserting text into phone number fields, they should appear as invalid, so test like that. 13. After successful testing, test also other patron modification screens. Go to patron's Details tab and you should see multiple "Edit" links on that page. The point is to make sure transport type selections are correctly removed from the patron if the modification screen lets you modify for example primary email, but does not present the messaging preferences at the bottom of the page. So, as an example, first insert patron a valid email and select all email transport types. Then, go to the "Edit" link right above "Patron messaging preferences" title on patron's details page. This page lets you modify "Primary email" but not messaging preferences. Clear the "Primary email" field and save, and observe that all previously selected email transport types are now removed. 14. Give your patron a valid email and go to Details tab -> "Edit" link below "Patron messaging preferences title" on the left. You should still be able to select email as transport types. 15. Go remove patron's primary email and repeat step 14. You will observe that it is no longer possible to select email as a transport type. 16. Try steps 13-15 with other transport types as well After this test plan you should have a pretty good idea of the feature. As mentioned earlier, this feature requires tests on the OPAC side
[Koha-bugs] [Bug 14590] Validate messaging preferences
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14590 George Williams (NEKLS) changed: What|Removed |Added CC||geo...@nekls.org -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://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/
[Koha-bugs] [Bug 14590] Validate messaging preferences
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14590 Lari Taskula changed: What|Removed |Added Attachment #62044|0 |1 is obsolete|| --- Comment #18 from Lari Taskula --- Created attachment 62071 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62071&action=edit Bug 14590: Validate messaging preferences Messaging preferences should be only available if a valid contact information is stored for the patron for that transport type. Otherwise, it should not be possible to select preferences for that transport type. For example, when attempting to set messages to be delivered via sms, we should automatically check patron's smsalertnumber before allowing this type of modification. If patron does not have a valid smsalertnumber and is not passing it along with the messaging preference change, we should not store those given messaging transport types. This patch implements exactly this. It uses Koha::Validation from Bug 14620 to validate contact informations and attaches it into patron modification logic - whenever messaging preferences are processed by Koha, preferences that link to an invalid or non-existent contact information will be removed. Client-side JavaScript checks are also implemented. When modifying patron information, messaging preferences for a certain transport type will be either enabled and/or disabled on the fly depending on validity of the contact info linked to that transport type (transport type "sms" => borrower "smsalertnumber"). TESTING: This feature requires tests both in OPAC and staff client. Requirements: 1. Apply patch(es) in Bug 14620 before this patch 2. Make sure EnhancedMessagingPreferences is enabled 3. Make sure EnhancedMessagingPreferencesOPAC is enabled 4. Make sure TalkingTechItivaPhoneNotification is enabled (activates transport type "phone") 5. Make sure SMSSendDriver is enabled (for simple testing purposes you can use the value "test") 6. Preference "ValidatePhoneNumber" needs a regular expression for validating phone numbers. An example regular expression is provided below the input field. You can use that while testing this feature. Copy-paste it into the input box and save preferences. (regex also provided below) ^((\+)?[1-9]{1,2})?([-\s\.])?((\(\d{1,4}\))|\d{1,4})(([-\s\.])?[0-9]{1,12}){1,2}$ TEST PLAN: 1. Login to staff client 2. Go to modification view of any patron 3. Scroll down all the way and you should see "Patron messaging preferences" table including checkboxes for transport types "SMS", "Phone" and "Email". 4. If the patron you are modifying has any contact information of the following "Primary email", "Primary phone", "SMS number", please clear those fields. 5. Scroll down. All checkboxes for the given transport types should now be disabled. 6. Modify field "Primary email" and insert "test". A warning of invalid email should appear. 7. Scroll down. Checkboxes for transport type "Email" should still be disabled. 8. Modify field "Primary email" and insert "nob...@example.com". 9. Scroll down. Checkboxes for transport type "Email" should now be enabled. 10. Select email as transport type for each message type and click "Save". 11. Go back to modification screen. The messaging preferences should still appear as you stored them. 12. Repeat steps 6-11 also for both "Phone" and "SMS number". When inserting text into phone number fields, they should appear as invalid, so test like that. 13. After successful testing, test also other patron modification screens. Go to patron's Details tab and you should see multiple "Edit" links on that page. The point is to make sure transport type selections are correctly removed from the patron if the modification screen lets you modify for example primary email, but does not present the messaging preferences at the bottom of the page. So, as an example, first insert patron a valid email and select all email transport types. Then, go to the "Edit" link right above "Patron messaging preferences" title on patron's details page. This page lets you modify "Primary email" but not messaging preferences. Clear the "Primary email" field and save, and observe that all previously selected email transport types are now removed. 14. Give your patron a valid email and go to Details tab -> "Edit" link below "Patron messaging preferences title" on the left. You should still be able to select email as transport types. 15. Go remove patron's primary email and repeat step 14. You will observe that it is no longer possible to select email as a transport type. 16. Try steps 13-15 with other transport types as well After this test plan you should have a pretty good idea of the feature. As mentioned earlier, this feature requires tests on the OPAC side
[Koha-bugs] [Bug 14590] Validate messaging preferences
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14590 Séverine Queune changed: What|Removed |Added CC||severine.que...@bulac.fr -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://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/
[Koha-bugs] [Bug 14590] Validate messaging preferences
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14590 Katrin Fischer changed: What|Removed |Added CC||katrin.fisc...@bsz-bw.de Status|Needs Signoff |Patch doesn't apply --- Comment #19 from Katrin Fischer --- I am sorry, this does no longer apply: Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 14590: Validate messaging preferences .git/rebase-apply/patch:663: trailing whitespace. print scalar ($destination eq "circ") ? error: sha1 information is lacking or useless (Koha/Validation.pm). error: could not build fake ancestor Patch failed at 0001 Bug 14590: Validate messaging preferences The copy of the patch that failed is found in: .git/rebase-apply/patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-14590-Validate-messaging-preferences-JMLoUs.patch >From eyeballing the code I was wondering if you only check 'primary email' and don't take AutoEmailPrimaryAddress into account? -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://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/
[Koha-bugs] [Bug 14590] Validate messaging preferences
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14590 Katrin Fischer changed: What|Removed |Added Status|Patch doesn't apply |BLOCKED --- Comment #20 from Katrin Fischer --- Sorry, I had missed the dependency on bug 14620, but this also doesn't apply. Marking this one 'blocked' and the other 'doesn't apply'. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://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/
[Koha-bugs] [Bug 14590] Validate messaging preferences
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14590 Katrin Fischer changed: What|Removed |Added See Also||https://bugs.koha-community ||.org/bugzilla3/show_bug.cgi ||?id=31424 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/