If dateofbirth is in BorrowerMandatoryFields, and a range of ages is set in the categories, when you enter a member, it's supposed to be checking to see if the patron's age is within that range, and complain if not. Indeed, the code seems to be trying to do just that (memberentry.pl, lines 267-276, as of 3.8.2), but it's not actually being enforced. It appears that the redefinition of @field_check for hiding some fields in the template (line 106) is the culprit. I'll have a patch shortly.
Created attachment 10715 [details] [review] Proposed patch To test, make sure that you have "dateofbirth" in BorrowerMandatoryFields. Then set up a category with age-range limits, and attempt to save a patron whose birthdate would be outside that range. Koha should complain, and return to the member entry screen. Change the age to within the allowable range for the category, or change the category to one where that patron's age is allowed, and the save should work. -Ruth
This should apply to 3.8.x and Master. The change to memberentry.pl that *caused* the bug did not enter until 3.8, so it won't be needed for 3.6.x. -Ruth
Created attachment 10718 [details] [review] Signed-off patch I wait your sign-off on the following patch before marking this patch as signed-off.
Created attachment 10719 [details] [review] Bug 8392: Avoid having an untranslatable age range
*** Bug 3410 has been marked as a duplicate of this bug. ***
*** Bug 8464 has been marked as a duplicate of this bug. ***
Created attachment 10983 [details] [review] [SIGNED-OFF] Bug 8392: Avoid having an untranslatable age range [SIGNED-OFF] Bug 8392: Avoid having an untranslatable age range Currently, error message reports an age range in English. For example '0 to 17'. With this patch, the 'to' is not in the .pl file anymore. Ruth could you sign-off this fix? Signed-off-by: Owen Leonard <oleonard@myacpl.org>
QA Comments: Humm, I think it would have been better to rename the second field_check variable. Thus the initialisation of $dateofbirthmandatory keeps close to it usage (l.~100 and l.~270). But it works. Marking as Passed QA
The patch has been pushed, but I'm wondering if there is not another problem: why should the birthdate be mandatory to deal with age limits ? Shouldn't we check AgeLimit anyway ? Shouldn't we have a rule like "check AgeLimit if there is a birthdate, otherwise, it's OK" ?
(In reply to comment #9) > Shouldn't we have a rule like "check AgeLimit if there is a birthdate, > otherwise, it's OK" ? I wondered the same thing when I was testing it, but I think it makes sense. Using BorrowerMandatoryFields acts as a de-facto system preference for choosing whether or not the age limit should be enforced. If I want to enforce the age limit on a patron category I want to enforce it on all patrons, not just patrons for whom I have entered a birth date.
(In reply to comment #10) > (In reply to comment #9) > > Shouldn't we have a rule like "check AgeLimit if there is a birthdate, > > otherwise, it's OK" ? > > I wondered the same thing when I was testing it, but I think it makes sense. > Using BorrowerMandatoryFields acts as a de-facto system preference for > choosing whether or not the age limit should be enforced. If I want to > enforce the age limit on a patron category I want to enforce it on all > patrons, not just patrons for whom I have entered a birth date. It's a change in the behaviour I was not aware. I think it has been introduced in 3.6. I don't see anything about that in the docs: http://manual.koha-community.org/3.8/en/patscirc.html#patcats Adding Nicole. Nicole, please read comment 9 = age limit is checked only if birthdate is a borrower mandatory field !
Pushed to 3.8.x will be in 3.8.4
Manual updated