Bug 40520 - PatronSelfRegistrationAgeRestriction doesn't save blank
Summary: PatronSelfRegistrationAgeRestriction doesn't save blank
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: 25.05
Hardware: All All
: P5 - low normal
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-25 18:51 UTC by Sara Brown
Modified: 2025-07-25 19:38 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.