Bug 39579 - Add ability to restrict patron date of birth on self registration
Summary: Add ability to restrict patron date of birth on self registration
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Alexander Blanchard
QA Contact: Lisette Scheer
URL:
Keywords:
: 39481 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-04-08 09:35 UTC by Alexander Blanchard
Modified: 2025-05-08 14:40 UTC (History)
6 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
This new feature adds a new system preference `PatronSelfRegistrationAgeRestriction` to restrict the maximum age of patrons self registering.
Version(s) released in:
25.05.00
Circulation function:


Attachments
Bug 39579: Restrict Patron Self Reg Date of Birth (6.82 KB, patch)
2025-04-08 13:11 UTC, Alexander Blanchard
Details | Diff | Splinter Review
Bug 39579: Restrict Patron Self Reg Date of Birth (6.96 KB, patch)
2025-04-14 20:15 UTC, Emmanuel Bétemps
Details | Diff | Splinter Review
Bug 39579: Restrict Patron Self Reg Date of Birth (7.03 KB, patch)
2025-05-07 20:10 UTC, Lisette Scheer
Details | Diff | Splinter Review
Bug 39579: (QA follow-up) Update atomic update (1.67 KB, patch)
2025-05-07 20:10 UTC, Lisette Scheer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Blanchard 2025-04-08 09:35:21 UTC
Some libraries are getting dates of birth from the self-registration form that make patrons impossible ages e.g. year of birth 1900. Add a system preference to allow libraries to add a maximum age when patrons self register so that they receive an error message if their date of birth exceeds this age, prompting them to make a correction.
Comment 1 Alexander Blanchard 2025-04-08 13:11:02 UTC
Created attachment 180718 [details] [review]
Bug 39579: Restrict Patron Self Reg Date of Birth

Some libraries are getting dates of birth from the
self-registration form that make patrons impossible
ages, e.g. year of birth 1900.

To Test:
1) Navigate to the oPac
2) Ensure you are not logged in
3) Below the log in, see 'Create an Account'
4) Click the link and complete the relevant fields
5) Add an unrealistic d.o.b e.g 1900
6) Complete the verification and click 'Submit'
7) Your acount has been created
8) Apply the patch
9) Navigate to the staff site
10) Navigate to Administration > SystemPreferences
11) Navigate to OPAC preferences
12) Identify PatronSelfRegistrationAgeRestriction
13) Add a maximum age in numberals e.g. 100
14) Repeat steps 1 - 6
15) An error message that you have exceeded max age will appear.
16) Alter your date of birth to make your age below that of the max age you set
17) Complete the verification
18) Your account should be created as normal

Sponsored-by: Cheshire
Comment 2 Emmanuel Bétemps 2025-04-14 20:15:35 UTC
Created attachment 180938 [details] [review]
Bug 39579: Restrict Patron Self Reg Date of Birth

Some libraries are getting dates of birth from the
self-registration form that make patrons impossible
ages, e.g. year of birth 1900.

To Test:
1) Navigate to the oPac
2) Ensure you are not logged in
3) Below the log in, see 'Create an Account'
4) Click the link and complete the relevant fields
5) Add an unrealistic d.o.b e.g 1900
6) Complete the verification and click 'Submit'
7) Your acount has been created
8) Apply the patch
9) Navigate to the staff site
10) Navigate to Administration > SystemPreferences
11) Navigate to OPAC preferences
12) Identify PatronSelfRegistrationAgeRestriction
13) Add a maximum age in numberals e.g. 100
14) Repeat steps 1 - 6
15) An error message that you have exceeded max age will appear.
16) Alter your date of birth to make your age below that of the max age you set
17) Complete the verification
18) Your account should be created as normal

Sponsored-by: Cheshire
Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Comment 3 Emmanuel Bétemps 2025-04-14 20:16:31 UTC
Hi,

I followed the test plan : it works :)

Manu.
Comment 4 Martin Renvoize (ashimema) 2025-04-15 09:07:47 UTC
*** Bug 39481 has been marked as a duplicate of this bug. ***
Comment 5 Lisette Scheer 2025-05-07 20:10:35 UTC
Created attachment 182046 [details] [review]
Bug 39579: Restrict Patron Self Reg Date of Birth

Some libraries are getting dates of birth from the
self-registration form that make patrons impossible
ages, e.g. year of birth 1900.

To Test:
1) Navigate to the OPAC
2) Ensure you are not logged in
3) Below the log in, see 'Create an Account'
4) Click the link and complete the relevant fields
5) Add an unrealistic d.o.b e.g 1900
6) Complete the verification and click 'Submit'
7) Your acount has been created
8) Apply the patch
9) Navigate to the staff site
10) Navigate to Administration > SystemPreferences
11) Navigate to OPAC preferences
12) Identify PatronSelfRegistrationAgeRestriction
13) Add a maximum age in numberals e.g. 100
14) Repeat steps 1 - 6
15) An error message that you have exceeded max age will appear.
16) Alter your date of birth to make your age below that of the max age you set
17) Complete the verification
18) Your account should be created as normal

Sponsored-by: Cheshire
Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Comment 6 Lisette Scheer 2025-05-07 20:10:37 UTC
Created attachment 182047 [details] [review]
Bug 39579: (QA follow-up) Update atomic update

This patch updates the atomic update to fix an error when the database was updated and the permissions for the atomic update file.

Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Comment 7 Katrin Fischer 2025-05-08 06:04:11 UTC
Maybe an idea for a later improvement (separate bug): I wonder if a mininum age would also be useful. Syntax could be similar to CardnumberLength.
Comment 8 Katrin Fischer 2025-05-08 06:51:18 UTC
Pushed for 25.05!

Well done everyone, thank you!