Bug 40520

Summary: PatronSelfRegistrationAgeRestriction doesn't save blank
Product: Koha Reporter: Sara Brown <sbrown>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: andrew
Version: 25.05   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39579
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Sara Brown 2025-07-25 18:51:20 UTC
If I add an age to PatronSelfRegistrationAgeRestriction and save, but then want to remove the age to disable the system preference, 'null' won't save properly. I get a 'Nothing to save' message, and the original value is still enforced. If I then leave the page and later return to the system preference, the entry box appears null even though the original value is still being enforced. 

As a temporary (and unintuitive) workaround, I can save 0 and still self-register patrons of any age.
Comment 1 Andrew Fuerste-Henry 2025-07-25 19:38:04 UTC
Bug 40405 seeks to move away from NULL system preferences, so I suppose we really want to blank this instead?

I can confirm that setting the preference to 0 makes it act as if unset, rather than requiring all self-reg patrons to be less than 1 year old. This is convenient and makes sort sort of sense, but it's clear enough that I'm happy to rely upon it as a solution here.