Summary: | Updating the date of birth sometimes shows wrong age | ||
---|---|---|---|
Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
Component: | Patrons | Assignee: | Bugs List <koha-bugs> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | blawlor, gmcharlt, jonathan.druart, kyle.m.hall, marie.hedbom |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: |
Description
Katrin Fischer
2022-05-06 08:22:07 UTC
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... 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 :) |