Bug 27717 - Date of birth fails to display for babies under 1 year
Summary: Date of birth fails to display for babies under 1 year
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL:
Keywords:
Depends on: 15400
Blocks:
  Show dependency treegraph
 
Reported: 2021-02-17 12:23 UTC by Martin Renvoize
Modified: 2021-03-14 19:31 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.04


Attachments
Bug 27717: Display date of birth even if the patron is under 1 (1.38 KB, patch)
2021-02-17 12:31 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27717: Display date of birth even if the patron is under 1 (1.33 KB, patch)
2021-02-18 15:49 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27717: Display date of birth even if the patron is under 1 (1.39 KB, patch)
2021-02-19 18:40 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 27717: Display date of birth even if the patron is under 1 (1.51 KB, patch)
2021-03-04 17:55 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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