Summary: | Patron age verification while doing the self-registration | ||
---|---|---|---|
Product: | Koha | Reporter: | Amit Gupta <amitddng135> |
Component: | OPAC | Assignee: | Lucas Gass (lukeg) <lucas> |
Status: | Pushed to stable --- | QA Contact: | Katrin Fischer <katrin.fischer> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | amit.gupta, andrew, clackman, david, lucas, sam.sowanick, severine.queune |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26218 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21602 |
||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: |
This enhancement adds age verification checking to the self-registration and personal details forms. A message is now shown if the date of birth entered doesn't match with the patron category age range, "Patron's age is incorrect for their category. Please try again.".
|
|
Version(s) released in: |
25.05.00,24.11.04
|
Circulation function: | |
Attachments: |
Bug 26211-Patron age checking while doing the membership registration through OPAC
Bug 26211 - Patron age verification while doing the self-registration. Bug 26211: (follow-up) Remove age_low and age_high template variables Bug 26211: (follow-up) Remove age_low and age_high template variables |
Description
Amit Gupta
2020-08-14 12:56:46 UTC
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. *** Bug 21602 has been marked as a duplicate of this bug. *** Will this get worked on again? Seems like we could easily use is_age_valid here. I don't think we should pass along any information about the age requirements for a given patron category. (Ages allowed are [% age_low | html %]-[% age_high | html %].) It's not a hint to allow the user to adjust their DOB. Created attachment 175366 [details] [review] Bug 26211: (follow-up) Remove age_low and age_high template variables Created attachment 175582 [details] [review] Bug 26211: (follow-up) Remove age_low and age_high template variables Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov> I have removed the "Please try again." as we also show "Please correct and resubmit" below the errors and it seemed like a bit of a double up. The patron age check is also done when an existing patron updates their address etc. information. You can still leave it empty, if it's not made mandatory. Pushed for 25.05! Well done everyone, thank you! Nice work everyone! Pushed to 24.11.x for 24.11.04 |