Bug 27717

Summary: Date of birth fails to display for babies under 1 year
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: PatronsAssignee: Martin Renvoize <martin.renvoize>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: andrewfh, barbara.johnson, fiona.borthwick, fridolin.somers, gmcharlt, jonathan.druart, kyle.m.hall
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.04
Bug Depends on: 15400    
Bug Blocks:    
Attachments: Bug 27717: Display date of birth even if the patron is under 1
Bug 27717: Display date of birth even if the patron is under 1
Bug 27717: Display date of birth even if the patron is under 1
Bug 27717: Display date of birth even if the patron is under 1

Description Martin Renvoize 2021-02-17 12:23:49 UTC
The 'age' check is in the wrong location in patron-age.inc and removes the date of birth date entirely when the patrons age is '0' years.
Comment 1 Martin Renvoize 2021-02-17 12:31:05 UTC
Created attachment 116936 [details] [review]
Bug 27717: Display date of birth even if the patron is under 1

This patch moves the 'age' condition to below the date of birth display,
allowing the date to display for babies.

Test plan
1/ Add a user with a date of birth within the last year
2/ Check that the date of birth appears on the patron details page
(under contact details) with the patch applied.
Comment 2 Owen Leonard 2021-02-17 18:41:00 UTC
This breaks patron search in the patrons module--the JSON is broken.
Comment 3 Martin Renvoize 2021-02-18 15:49:38 UTC
Created attachment 116999 [details] [review]
Bug 27717: Display date of birth even if the patron is under 1

This patch moves the 'age' condition to below the date of birth display,
allowing the date to display for babies.

Test plan
1/ Add a user with a date of birth within the last year
2/ Check that the date of birth appears on the patron details page
(under contact details) with the patch applied.
Comment 4 Martin Renvoize 2021-02-18 15:50:10 UTC
OK, That was rather unexpected!.. Thanks for testing Owen, new patch attached.
Comment 5 ByWater Sandboxes 2021-02-19 18:40:48 UTC
Created attachment 117094 [details] [review]
Bug 27717: Display date of birth even if the patron is under 1

This patch moves the 'age' condition to below the date of birth display,
allowing the date to display for babies.

Test plan
1/ Add a user with a date of birth within the last year
2/ Check that the date of birth appears on the patron details page
(under contact details) with the patch applied.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Comment 6 Barbara Johnson 2021-02-19 18:42:50 UTC
The birthdate and age calculation appeared correctly. I was also able to search for patrons. Everything looked good to me.
Comment 7 Katrin Fischer 2021-03-04 17:55:15 UTC
Created attachment 117756 [details] [review]
Bug 27717: Display date of birth even if the patron is under 1

This patch moves the 'age' condition to below the date of birth display,
allowing the date to display for babies.

Test plan
1/ Add a user with a date of birth within the last year
2/ Check that the date of birth appears on the patron details page
(under contact details) with the patch applied.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Jonathan Druart 2021-03-05 12:51:56 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 9 Fridolin Somers 2021-03-08 15:51:07 UTC
Pushed to 20.11.x for 20.11.04
Comment 10 Andrew Fuerste-Henry 2021-03-14 19:31:31 UTC
Missing dependency, not backported to 20.05