Bug 26211 - Patron age verification while doing the self-registration
Summary: Patron age verification while doing the self-registration
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Amit Gupta
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-14 12:56 UTC by Amit Gupta
Modified: 2022-01-25 20:42 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 26211-Patron age checking while doing the membership registration through OPAC (2.98 KB, patch)
2020-08-14 14:10 UTC, Amit Gupta
Details | Diff | Splinter Review
Bug 26211 - Patron age verification while doing the self-registration. (2.96 KB, patch)
2020-08-14 16:51 UTC, Amit Gupta
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Amit Gupta 2020-08-14 12:56:46 UTC
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."
Comment 1 Amit Gupta 2020-08-14 14:10:09 UTC Comment hidden (obsolete)
Comment 2 Katrin Fischer 2020-08-14 14:17:48 UTC
Looks good on first glance! Commit message needs a little fix - 
Bug 26211: Patron ...
Comment 3 Amit Gupta 2020-08-14 16:47:09 UTC
(In reply to Katrin Fischer from comment #2)
> Looks good on first glance! Commit message needs a little fix - 
> Bug 26211: Patron ...
Comment 4 Amit Gupta 2020-08-14 16:48:13 UTC
(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"
Comment 5 Amit Gupta 2020-08-14 16:51:41 UTC
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.
Comment 6 Katrin Fischer 2020-08-14 16:57:00 UTC
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.
Comment 7 Owen Leonard 2020-08-14 16:59:10 UTC
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
Comment 8 Amit Gupta 2020-08-14 17:16:31 UTC
(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
Comment 9 Amit Gupta 2020-08-14 18:04:23 UTC
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.