To test: - Edit a patron record - Set date of birth to today - Note that the age hint claims the user is -1 year 11 months :(
Some more clues: - the age hint only appears on editing, not when adding a patron and overwrites the format hint when clicking outside the input field - dates in the past month calculate the age correctly - dates in the current month, future and past, show the issue - Example: 05/01/2022 (MM/DD/YYYY) Age: -1 year 11 months
The write_age function seems to be a little buggy... If you pick a date which is less than one month ago it won't send an age string, so the date format hint is not replaced. If you pick a date more than one month ago and *then* pick a date less than one month ago (or you clear the field) the first age will remain. The original patch adding the patron's age omitted handling of days, but it would be nice if it calculated the age in days *if* the date of birth is under one month ago.
Hm, you don't get the negative -1 and 11 months? Because that just seems plain wrong when the person is just a day old...
No I don't get the negatives. I'm testing with Bug 30514, Bug 30706, and Bug 30713 applied.
I don't recreate the -1, however there is a bug: - Select a date one year ago => Age 1 year OK - Select today => Age 1 year KO The date is not updated if a date in the last month is selected.
It's behaving a little different now: 1) Edit any existing patron, like Henry Acevedo 2) Notice he is 64 years old 3) Update the date to any past date in the current month -> the age hint doesn't update: 64 years 4) Change the date to a year back -> the age hint will now be updated: 1 year It looks like it doesn't do the negative any more, but that it should always update the displayed date, even if it's 0 years?
(In reply to Owen Leonard from comment #4) > No I don't get the negatives. I'm testing with Bug 30514, Bug 30706, and Bug > 30713 applied. I don't see this bug in the current master. It looks like it was resolved by these patches in 22.05
Thanks for testing Brendan, happy to close this :)