Currently we are not checking patron age while doing the membership registration from the OPAC. We are checking patron age while doing registration through Staff page. for ex: "The following fields are wrong. Please fix them. Patron's age is incorrect for their category. Ages allowed are 5-17."
Created attachment 108283 [details] [review] Bug 26211-Patron age checking while doing the membership registration through OPAC To Test 1. Create the patron category from the staff page for ex: Kid and give age required and age Upperage limit age required 5 yrs and upperage limit 17. 2. Allow category in PatronSelfRegistrationDefaultCategory for online registration from opac. 3. Go to /cgi-bin/koha/opac-memberentry.pl page. 4. Fill the form and give choose date of birth 10/10/1974 and click OK. Now you can able to save the page. 5. Apply the patch. 6. Again go to cgi-bin/koha/opac-memberentry.pl page. 7. Fill the form and give choose date of birth 10/10/1974 and click OK. It will give the error message. Patron's age is incorrect for their category. Ages allowed are 5-17. ------------------------------------------------------------------------ This patch check patron age defined in the patron categories while doing the registration from the OPAC.
Looks good on first glance! Commit message needs a little fix - Bug 26211: Patron ...
(In reply to Katrin Fischer from comment #2) > Looks good on first glance! Commit message needs a little fix - > Bug 26211: Patron ...
(In reply to Katrin Fischer from comment #2) > Looks good on first glance! Commit message needs a little fix - > Bug 26211: Patron ... I think below message looks OK. "Patron age verification while doing the self-registration"
Created attachment 108303 [details] [review] Bug 26211 - Patron age verification while doing the self-registration. Modify Commit message -> "Patron age versification while doing the self-registration" To Test 1. Create the patron category from the staff page for ex: Kid and give age required and age Upperage limit age required 5 yrs and upperage limit 17. 2. Allow category in PatronSelfRegistrationDefaultCategory for online registration from opac. 3. Go to /cgi-bin/koha/opac-memberentry.pl page. 4. Fill the form and give choose date of birth 10/10/1974 and click OK. Now you can able to save the page. 5. Apply the patch. 6. Again go to cgi-bin/koha/opac-memberentry.pl page. 7. Fill the form and give choose date of birth 10/10/1974 and click OK. It will give the error message. Patron's age is incorrect for their category. Ages allowed are 5-17.
The QA scripts complain if the commit message doesn't start with Bug xxxx: - that was what I meant, but I was not clear about it.
I'm getting some errors from this. If I have the patron category field exposed in the patron self-registration form I get this error when submitting the form with an invalid date of birth: Can't call method "param" on an undefined value at /kohadevbox/koha/opac/opac-memberentry.pl line 485 If I hide the patron category field and submit the form with a valid or invalid date of birth I get this error: Can't call method "dateofbirthrequired" on an undefined value at /kohadevbox/koha/opac/opac-memberentry.pl line 482
(In reply to Owen Leonard from comment #7) > I'm getting some errors from this. If I have the patron category field > exposed in the patron self-registration form I get this error when > submitting the form with an invalid date of birth: > > Can't call method "param" on an undefined value at > /kohadevbox/koha/opac/opac-memberentry.pl line 485 > > If I hide the patron category field and submit the form with a valid or > invalid date of birth I get this error: > > Can't call method "dateofbirthrequired" on an undefined value at > /kohadevbox/koha/opac/opac-memberentry.pl line 482 Thank Owen for giving the feedback. I am able to reproduce the second issue. But with first one I am able to save the form and not find any issue. In case if I am giving the invalid date of birth (In reply to Owen Leonard from comment #7) > I'm getting some errors from this. If I have the patron category field > exposed in the patron self-registration form I get this error when > submitting the form with an invalid date of birth: > > Can't call method "param" on an undefined value at > /kohadevbox/koha/opac/opac-memberentry.pl line 485 > > If I hide the patron category field and submit the form with a valid or > invalid date of birth I get this error: > > Can't call method "dateofbirthrequired" on an undefined value at > /kohadevbox/koha/opac/opac-memberentry.pl line 482 Thank Owen for giving the feedback. I am able to reproduce the second issue. But with first one I am able to save the form and not find any issue. In case if I am giving the invalid date of birth
I have checked and calendar have some issues. While doing the registration from OPAC if we will give any invalid date it is not giving any alert or error message. It's simply saving the record. I will raise a bug to fix the calendar issue on the OPAC side.