Summary: | write_age function broken by Flatpickr conversion | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | Templates | Assignee: | Owen Leonard <oleonard> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | david, kyle, testopia |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This fixes the display of a patron's age in the staff interface after the date of birth field (for example: Age: 63 years 4 months). This was not displaying after the switch to Flatpickr for date entry on this page in the 21.11 release development cycle.
|
Version(s) released in: |
21.11.00
|
Circulation function: | |||
Bug Depends on: | 28937 | ||
Bug Blocks: | 26244 | ||
Attachments: |
Bug 29278: Fix selector of hint used to show age
Bug 29278: Fix selector of hint used to show age Bug 29278: Fix selector of hint used to show age |
Description
Owen Leonard
2021-10-19 16:18:44 UTC
Created attachment 126528 [details] [review] Bug 29278: Fix selector of hint used to show age This patch modifies the patron entry form to correct a problem with the write_age() function introduced by the switch to Flatpickr on this page (Bug 28937). Rather than selecting the element based on the sequence of elements on the page, we should add an ID for direct selection. To test, apply the patch and go to Patrons. - Locate a patron record which has a date of birth saved. - When you open that patron for editing, you should see their age displayed below the date of birth input field, e.g. "Age: 23 years 9 months." - Changing the date in the date of birth field should update the age string correctly. - Go to Patrons -> New patron. - The date of birth field should have a hint showing the required date format, e.g. "(DD.MM.YYYY)". - When you select a date of birth using the Flatpickr calendar the age string should be updated correctly. Created attachment 126631 [details] [review] Bug 29278: Fix selector of hint used to show age This patch modifies the patron entry form to correct a problem with the write_age() function introduced by the switch to Flatpickr on this page (Bug 28937). Rather than selecting the element based on the sequence of elements on the page, we should add an ID for direct selection. To test, apply the patch and go to Patrons. - Locate a patron record which has a date of birth saved. - When you open that patron for editing, you should see their age displayed below the date of birth input field, e.g. "Age: 23 years 9 months." - Changing the date in the date of birth field should update the age string correctly. - Go to Patrons -> New patron. - The date of birth field should have a hint showing the required date format, e.g. "(DD.MM.YYYY)". - When you select a date of birth using the Flatpickr calendar the age string should be updated correctly. Signed-off-by: David Nind <david@davidnind.com> While I LOVE the text to go in the release notes I wonder if it's useful for a case like this when the feature that causes it will only be released with 21.11 - so the bug this fixes hasn't had a chance to hit anyone (my favourite bugs of all). Maybe we should focus on the enh/new features and behaviour changing ones? Created attachment 126794 [details] [review] Bug 29278: Fix selector of hint used to show age This patch modifies the patron entry form to correct a problem with the write_age() function introduced by the switch to Flatpickr on this page (Bug 28937). Rather than selecting the element based on the sequence of elements on the page, we should add an ID for direct selection. To test, apply the patch and go to Patrons. - Locate a patron record which has a date of birth saved. - When you open that patron for editing, you should see their age displayed below the date of birth input field, e.g. "Age: 23 years 9 months." - Changing the date in the date of birth field should update the age string correctly. - Go to Patrons -> New patron. - The date of birth field should have a hint showing the required date format, e.g. "(DD.MM.YYYY)". - When you select a date of birth using the Flatpickr calendar the age string should be updated correctly. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to master for 21.11, thanks to everybody involved! |