[Koha-bugs] [Bug 14590] New: Checkboxes should be disabled without valid contact information in messaging preferences

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jul 22 15:45:05 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14590

            Bug ID: 14590
           Summary: Checkboxes should be disabled without valid contact
                    information in messaging preferences
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Patrons
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: larit at student.uef.fi
        QA Contact: testopia at bugs.koha-community.org
                CC: gmcharlt at gmail.com, kyle.m.hall at gmail.com

Currently, in Patron message preferences, it is possible to set message
transport type without valid contact information (e.g. send sms even if patron
does not have a phone number set).

This is very problematic for us since we have several Borrowers with
misconfigured messaging preferences, and that causes issues, like Borrowers not
knowing they have Items waiting for pickup. This makes customers angry and our
librarians sad, not to mention the technical staff.
Reasons for this are myriad but one big challenge is misconfigured messaging
preferences, both in OPAC and the staff client.

I have listed messaging preferences that would need to require valid contact
information:
#1 SMS (this requires valid SMSnumber)
#2 Phone (this requires valid phone)
#3 Email (this requires valid email)

Validations will be done both client-side and server-side. I am working on the
following plan:

Server-side validation 
- In C4::Form::MessagingPreferences::handle_form_action(), check for each
parameter (SMSnumber, phone, email) to see if they are provided.
- If the parameter is provided, allow message_transport_types to contain said
transport method for this message.
- If the parameter is not provided, remove the said transport method for this
message from message_transport_types.

Client-side validation
- Has to be done in both OPAC and staff client.
- With JavaScript, check the contents of each contact field (SMSnumber, phone,
email).
- If the contact field is invalid or empty, remove all checks from messaging
preferences checkboxes for this transport type. Also disable these checkboxes.
- Once the contact field becomes valid on input event, enable checkboxes for
this transport type and restore any previously stored state (e.g. we just want
to change phone number without setting all messaging preferences again).

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


More information about the Koha-bugs mailing list