Self-registration: system accepts wrong DOB format

Bug #1814150 reported by Chauncey Montgomery
48
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Evergreen
Confirmed
Medium
Unassigned

Bug Description

This issue is similar to Bug 1774253. We have found that when a patron enters the date incorrectly, viz., MM-DD-YYYY or MM/DD/YYYY, the date doesn't come through properly when staff load the pending patron.

In the case of MM-DD-YYYY, a random date is put in for the birth date (e.g., 01-01-1969 becomes 05-23-1906). If MM/DD/YYYY is entered, then the field is completely blank.

Either the format should accept MM-DD-YYYY and MM/DD/YYYY, or it should completely prevent the wrong format from being entered when the patron submits the form.

We are using 3.1.8.

tags: added: patron self-registration
Changed in evergreen:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Terran McCanna (tmccanna) wrote :

I thought there was already a launchpad bug for this, but I'm unable to find it.

I did a local fix for ours by tweaking the Javascript in the dobValidate function in js.tt2 to only accept dashes:

- var validformat = /^(19|20)\d\d([- /.])(0[1-9]|1[012])\2(0[1-9]|[12][0-9]|3[01])$/
+ var validformat = /^(19|20)\d\d([-])(0[1-9]|1[012])\2(0[1-9]|[12][0-9]|3[01])$/

and

- alert("[% l('You have entered an invalid date, or an improperly formatted date. Please enter Date of Birth in YYYY-MM-DD or YYYY/MM/DD format and try again.') %]")
+ alert("[% l('You have entered an invalid date, or an improperly formatted date. Please enter Date of Birth in YYYY-MM-DD format and try again.') %]")

I'm not sure if that's the best approach to this or if it would be better to change the code to accept other formats.

Andrea Neiman (aneiman)
tags: added: selfregistration
removed: self-registration
Revision history for this message
Eva Cerninakova (ece) wrote :

I would recommend for the date format to match the OPAC data setting, among other things because of localization. E.g., in Czech both YYYY-MM-DD and YYYY/MM/DD are quite unusual date format and thus they are confusing for users.

Revision history for this message
Terran McCanna (tmccanna) wrote :
Revision history for this message
Joan Kranich (jkranich) wrote :

Firefox for OPAC Self Registration
Chrome for staff Web Client
Evergreen release 3.4.2

In past testing I had difficulties with the date of birth loading properly in patron registration from a pending patron with a similar experience as described in this bug.

I have new results with today's test on 3.4.2.

The patron self registration form will not accept dates in the format of MM-DD-YYYY.
If I set the Web Client Library Setting: Format Dates with this pattern to MM-DD-YYYY and the Example dob field on patron registration to MM-DD-YYYY the self registration screen shows the example MM-DD-YYYY. However, I get an error when clicking Submit Registration stating to enter the date in YYYY-MM-DD or YYYY/MM/DD.
If I enter the date of birth in YYYY-MM-DD the form submits and the date of birth loads properly in the Web Client patron registration from the pending patron. That is good but a bad patron experience to get the error when completing the patron self registration form.

I believe the patron self registration form should use the library setting for the date format. Our library staff are most familiar with the format of MM-DD-YYYY.

Revision history for this message
Andrea Neiman (aneiman) wrote :

This is fixed in pullrequested bug 2065448 which reimplements this with a library setting to determine date order.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.