Bug 15400 - Display patron age in useful places in the staff interface
Summary: Display patron age in useful places in the staff interface
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff Client (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Josef Moravec
QA Contact: Testopia
URL:
Keywords:
: 24770 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-12-21 12:24 UTC by Martin Stenberg
Modified: 2020-06-29 11:50 UTC (History)
14 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.11.00


Attachments
Bug 15400: Show patron age in search results (6.66 KB, patch)
2015-12-21 12:43 UTC, Martin Stenberg
Details | Diff | Splinter Review
Bug 15400: Show patron age in search results (6.93 KB, patch)
2016-01-19 20:36 UTC, M. Tompsett
Details | Diff | Splinter Review
Bug 15400: Display date of birth and age more consistantly (8.41 KB, patch)
2018-11-02 13:32 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15400: Display date of birth and age more consistantly (8.47 KB, patch)
2018-11-28 22:36 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 15400: Display date of birth and age more consistantly (8.52 KB, patch)
2019-02-21 11:52 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 15400: (follow-up) Updating text display (1.78 KB, patch)
2019-02-21 19:49 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 15400: (followup) Adding age to check out search dropdown (2.16 KB, patch)
2019-02-21 20:45 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 15400: Display date of birth and age more consistantly (8.67 KB, patch)
2019-02-21 20:56 UTC, sandboxes@biblibre.com
Details | Diff | Splinter Review
Bug 15400: (follow-up) Updating text display (1.93 KB, patch)
2019-02-21 20:56 UTC, sandboxes@biblibre.com
Details | Diff | Splinter Review
Bug 15400: (followup) Adding age to check out search dropdown (2.36 KB, patch)
2019-02-21 20:57 UTC, sandboxes@biblibre.com
Details | Diff | Splinter Review
Bug 15400: Display date of birth and age more consistantly (8.72 KB, patch)
2019-03-11 14:30 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15400: (follow-up) Updating text display (1.94 KB, patch)
2019-03-11 14:30 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15400: (follow-up) Adding age to check out search dropdown (2.37 KB, patch)
2019-03-11 14:30 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15400: (follow-up) Restore 'years' string, remove untranslatable string (3.30 KB, patch)
2019-03-11 14:30 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15400: Display date of birth and age more consistantly (8.68 KB, patch)
2019-04-18 09:28 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15400: (follow-up) Updating text display (1.94 KB, patch)
2019-04-18 09:28 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15400: (follow-up) Adding age to check out search dropdown (2.37 KB, patch)
2019-04-18 09:28 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15400: (follow-up) Restore 'years' string, remove untranslatable string (3.30 KB, patch)
2019-04-18 09:28 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15400: (follow-up) Add class to years span (2.23 KB, patch)
2019-04-18 09:28 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15400: (follow-up) Add class to years span (2.15 KB, patch)
2019-04-26 05:59 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15400: (follow-up) Add class to years span (2.07 KB, patch)
2019-04-26 06:00 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15400: Display date of birth and age more consistantly (8.74 KB, patch)
2019-04-27 13:25 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 15400: (follow-up) Updating text display (2.00 KB, patch)
2019-04-27 13:25 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 15400: (follow-up) Adding age to check out search dropdown (2.43 KB, patch)
2019-04-27 13:25 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 15400: (follow-up) Restore 'years' string, remove untranslatable string (3.35 KB, patch)
2019-04-27 13:25 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 15400: (follow-up) Add class to years span (2.12 KB, patch)
2019-04-27 13:25 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 15400: Display date of birth and age more consistantly (8.62 KB, patch)
2020-03-03 19:25 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15400: (follow-up) Updating text display (2.00 KB, patch)
2020-03-03 19:25 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15400: (follow-up) Adding age to check out search dropdown (2.42 KB, patch)
2020-03-03 19:25 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15400: (follow-up) Restore 'years' string, remove untranslatable string (3.42 KB, patch)
2020-03-03 19:25 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15400: (follow-up) Add class to years span (2.11 KB, patch)
2020-03-03 19:26 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15400: Display date of birth and age more consistantly (8.67 KB, patch)
2020-03-03 20:03 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 15400: (follow-up) Updating text display (2.04 KB, patch)
2020-03-03 20:03 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 15400: (follow-up) Adding age to check out search dropdown (2.47 KB, patch)
2020-03-03 20:03 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 15400: (follow-up) Restore 'years' string, remove untranslatable string (3.47 KB, patch)
2020-03-03 20:03 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 15400: (follow-up) Add class to years span (2.15 KB, patch)
2020-03-03 20:03 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 15400: Clarify usage of patron-age.inc (1.34 KB, patch)
2020-03-04 13:51 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15400: (follow-up) Remove line break (1.03 KB, patch)
2020-04-21 13:22 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15400: Display date of birth and age more consistantly (8.73 KB, patch)
2020-06-21 16:42 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 15400: (follow-up) Updating text display (2.10 KB, patch)
2020-06-21 16:42 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 15400: (follow-up) Adding age to check out search dropdown (2.53 KB, patch)
2020-06-21 16:42 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 15400: (follow-up) Restore 'years' string, remove untranslatable string (3.53 KB, patch)
2020-06-21 16:42 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 15400: (follow-up) Add class to years span (2.21 KB, patch)
2020-06-21 16:42 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 15400: Clarify usage of patron-age.inc (1.39 KB, patch)
2020-06-21 16:43 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 15400: (follow-up) Remove line break (1.08 KB, patch)
2020-06-21 16:43 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 15400: Add class on patron brief info to allow hiding date of birth (1.12 KB, patch)
2020-06-21 16:43 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 15400: (follow-up) Remove unnecessary class (978 bytes, patch)
2020-06-25 15:09 UTC, Josef Moravec
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Stenberg 2015-12-21 12:24:39 UTC
Show patrons age in checkout search, member search and patrons circulation details (top left menu).
Comment 1 Martin Stenberg 2015-12-21 12:43:47 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2015-12-22 11:54:31 UTC
How is this related to "Bug 15206 - Show patron's age when filling date of birth in memberentry.pl"
Comment 3 Martin Stenberg 2015-12-22 12:24:40 UTC
They look related, but not contradicting or overlapping. Bug 15206 seems unnecessary code complex at first glance though.
Comment 4 Aleisha Amohia 2016-01-11 22:09:42 UTC
Is this similar to Bug 14763, but in more places?
Comment 5 Magnus Enger 2016-01-12 19:32:40 UTC
$ git bz apply 15400
Bug 15400 - display patron age in useful places

45882 - Bug 15400: Show patron age in search results

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 15400: Show patron age in search results
Using index info to reconstruct a base tree...
M	koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc
M	koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
M	koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc
Failed to merge in the changes.
Patch failed at 0001 Bug 15400: Show patron age in search results
Comment 6 Magnus Enger 2016-01-12 19:34:34 UTC
Also, I have a hunch this:

  </a>[% IF age %]([% age%])[% END %]

might be better written as:

  </a>[% IF age %] ([% age %])[% END %]

to 
1. Give a space between the link and the opening parenthesis
2. Make the layout of TT tags consistent
Comment 7 M. Tompsett 2016-01-19 20:36:25 UTC
Created attachment 46935 [details] [review]
Bug 15400: Show patron age in search results

Display patron age in search results and checkout details.

Test plan
=========

1. Go to checkout page for one patron (cgi-bin/koha/circ/circulation.pl)
2. In the circulation menu to the left, under the patrons name you should see a
   new field "Age:" showing the patrons age, if a date of birth is available.
3. Enter a search term that will match more than one patron in the checkout
   search field
4. A new table column "Age" should be visible and display each patrons age
5. In cgi-bin/koha/members/member.pl enter a search filter that will match more
   than one patron
6. Each patrons age should be visible within parentheses to the right of the
   patron name

NOTE: rebased to handle conflict with 13931, but I'm not sure this
      is fully needed, as 13931 adds date of birth.
Comment 8 Aleisha Amohia 2016-01-19 20:48:49 UTC
I get a software error at Step 3-4 in your test plan:
Template process failed: undef error - Date::Calc::Delta_YMD(): not a valid date at /usr/lib/perl5/Template/Plugin/Date.pm line 185.

I think the patch for Bug 14763 to show the age on the details page is a better place than above the address like in this patch.

I think that if we do want to show the age in brackets on member.pl search, maybe it should say (x years)? Doesn't make much sense to have all these random numbers next to names.
Comment 9 Josef Moravec 2018-11-02 13:32:16 UTC
Created attachment 81892 [details] [review]
Bug 15400: Display date of birth and age more consistantly

Test plan:
0) Apply the patch
1) Go to all of these pages
    Patron detail
    Other patron pages - look on the left side (circ-menu)
    Patron search
    Guarantor search ( go to child patron -> edit -> in guarantor
        section click "Set to patron"
    Search through "Check out" (in the header)

2) Confirm that does show date of birth and date consistantly,
    try it on patrons with and without date of birth set to find
    possible reggressions
Comment 10 Aleisha Amohia 2018-11-28 22:36:22 UTC
Created attachment 82714 [details] [review]
Bug 15400: Display date of birth and age more consistantly

Test plan:
0) Apply the patch
1) Go to all of these pages
    Patron detail
    Other patron pages - look on the left side (circ-menu)
    Patron search
    Guarantor search ( go to child patron -> edit -> in guarantor
        section click "Set to patron"
    Search through "Check out" (in the header)

2) Confirm that does show date of birth and date consistantly,
    try it on patrons with and without date of birth set to find
    possible reggressions

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Comment 11 Jonathan Druart 2018-12-13 18:55:50 UTC
Is this info really useful? For everybody?

To me it seems unnecessary additional info
Comment 12 Kyle M Hall 2019-02-21 11:52:09 UTC
(In reply to Jonathan Druart from comment #11)
> Is this info really useful? For everybody?
> 
> To me it seems unnecessary additional info

I think it's useful. The biggest issue I have is the wording takes up a lot of real estate. I think "Date of birth: 05/30/1958 (60 years)" could be changed to "Born: 05/30/1958 (60)", or "DOB: 05/30/1958 (60)" or something similar. Other than that, I think this is a good patch.
Comment 13 Kyle M Hall 2019-02-21 11:52:31 UTC
Created attachment 85432 [details] [review]
Bug 15400: Display date of birth and age more consistantly

Test plan:
0) Apply the patch
1) Go to all of these pages
    Patron detail
    Other patron pages - look on the left side (circ-menu)
    Patron search
    Guarantor search ( go to child patron -> edit -> in guarantor
        section click "Set to patron"
    Search through "Check out" (in the header)

2) Confirm that does show date of birth and date consistantly,
    try it on patrons with and without date of birth set to find
    possible reggressions

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 14 Aleisha Amohia 2019-02-21 19:49:43 UTC
Created attachment 85479 [details] [review]
Bug 15400: (follow-up) Updating text display

Now shows as 'Born: [date of birth] (age)' in circ sidebar menu and
search results

Sponsored-by: Catalyst IT
Comment 15 Séverine Queune 2019-02-21 20:30:14 UTC
Patch applies correctly except for "Check out" in the header (i still have "NAME, surname (cardnumber) birthdate adress").
Change to Failed [hoping not for too long :)]
Comment 16 Aleisha Amohia 2019-02-21 20:45:41 UTC
Created attachment 85494 [details] [review]
Bug 15400: (followup) Adding age to check out search dropdown

Confirm age shows in the suggestions dropdown when using the checkout
search in header (if user set DOB).
Confirm 'Age unknown' shows if no DOB set.
Comment 17 Séverine Queune 2019-02-21 20:54:56 UTC
Everything works as described now, thanks Aleisha !
Comment 18 sandboxes@biblibre.com 2019-02-21 20:56:11 UTC
Patch tested with a sandbox, by Séverine QUEUNE <severine.queune@bulac.fr>
Comment 19 sandboxes@biblibre.com 2019-02-21 20:56:54 UTC
Created attachment 85495 [details] [review]
Bug 15400: Display date of birth and age more consistantly

Test plan:
0) Apply the patch
1) Go to all of these pages
    Patron detail
    Other patron pages - look on the left side (circ-menu)
    Patron search
    Guarantor search ( go to child patron -> edit -> in guarantor
        section click "Set to patron"
    Search through "Check out" (in the header)

2) Confirm that does show date of birth and date consistantly,
    try it on patrons with and without date of birth set to find
    possible reggressions

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 20 sandboxes@biblibre.com 2019-02-21 20:56:57 UTC
Created attachment 85496 [details] [review]
Bug 15400: (follow-up) Updating text display

Now shows as 'Born: [date of birth] (age)' in circ sidebar menu and
search results

Sponsored-by: Catalyst IT

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 21 sandboxes@biblibre.com 2019-02-21 20:57:01 UTC
Created attachment 85497 [details] [review]
Bug 15400: (followup) Adding age to check out search dropdown

Confirm age shows in the suggestions dropdown when using the checkout
search in header (if user set DOB).
Confirm 'Age unknown' shows if no DOB set.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 22 Josef Moravec 2019-02-22 07:45:14 UTC
Comment on attachment 85497 [details] [review]
Bug 15400: (followup) Adding age to check out search dropdown

Review of attachment 85497 [details] [review]:
-----------------------------------------------------------------

::: circ/ysearch.pl
@@ +85,4 @@
>          firstname      => $b->firstname  // '',
>          cardnumber     => $b->cardnumber // '',
>          dateofbirth    => format_sqldatetime($b->dateofbirth, undef, undef, 1) // '',
> +        age            => $b->get_age    // 'Age unknown',

This is bad, string 'Age unknown' is not translatable
Comment 23 Josef Moravec 2019-02-22 07:47:22 UTC
Also, I do not like the 'years' word removed, but that's only my personal opinion
Comment 24 Katrin Fischer 2019-02-22 08:44:06 UTC
(In reply to Josef Moravec from comment #22)
> Comment on attachment 85497 [details] [review] [review]
> Bug 15400: (followup) Adding age to check out search dropdown
> 
> Review of attachment 85497 [details] [review] [review]:
> -----------------------------------------------------------------
> 
> ::: circ/ysearch.pl
> @@ +85,4 @@
> >          firstname      => $b->firstname  // '',
> >          cardnumber     => $b->cardnumber // '',
> >          dateofbirth    => format_sqldatetime($b->dateofbirth, undef, undef, 1) // '',
> > +        age            => $b->get_age    // 'Age unknown',
> 
> This is bad, string 'Age unknown' is not translatable

When woudl this display? I think if the user has no date of birth, we should just display 'nothing'.

Thx Josef for spotting this! I also liked the 'years'.
Comment 25 Josef Moravec 2019-03-11 14:30:38 UTC
Created attachment 86457 [details] [review]
Bug 15400: Display date of birth and age more consistantly

Test plan:
0) Apply the patch
1) Go to all of these pages
    Patron detail
    Other patron pages - look on the left side (circ-menu)
    Patron search
    Guarantor search ( go to child patron -> edit -> in guarantor
        section click "Set to patron"
    Search through "Check out" (in the header)

2) Confirm that does show date of birth and date consistantly,
    try it on patrons with and without date of birth set to find
    possible reggressions

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 26 Josef Moravec 2019-03-11 14:30:42 UTC
Created attachment 86458 [details] [review]
Bug 15400: (follow-up) Updating text display

Now shows as 'Born: [date of birth] (age)' in circ sidebar menu and
search results

Sponsored-by: Catalyst IT

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 27 Josef Moravec 2019-03-11 14:30:46 UTC
Created attachment 86459 [details] [review]
Bug 15400: (follow-up) Adding age to check out search dropdown

Confirm age shows in the suggestions dropdown when using the checkout
search in header (if user set DOB).
Confirm 'Age unknown' shows if no DOB set.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 28 Josef Moravec 2019-03-11 14:30:50 UTC
Created attachment 86460 [details] [review]
Bug 15400: (follow-up) Restore 'years' string, remove untranslatable string
Comment 29 Katrin Fischer 2019-04-10 11:00:37 UTC
Hi Josef,

this works nicely, with one exception: on the guarantors search the number doesn't show, only ( years).

As there has been some controversy about showing this information - could you consider wrapping a span with a class around the years part?

Thx!
Comment 30 Josef Moravec 2019-04-18 09:28:39 UTC
Created attachment 88274 [details] [review]
Bug 15400: Display date of birth and age more consistantly

Test plan:
0) Apply the patch
1) Go to all of these pages
    Patron detail
    Other patron pages - look on the left side (circ-menu)
    Patron search
    Guarantor search ( go to child patron -> edit -> in guarantor
        section click "Set to patron"
    Search through "Check out" (in the header)

2) Confirm that does show date of birth and date consistantly,
    try it on patrons with and without date of birth set to find
    possible reggressions

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 31 Josef Moravec 2019-04-18 09:28:43 UTC
Created attachment 88275 [details] [review]
Bug 15400: (follow-up) Updating text display

Now shows as 'Born: [date of birth] (age)' in circ sidebar menu and
search results

Sponsored-by: Catalyst IT

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 32 Josef Moravec 2019-04-18 09:28:47 UTC
Created attachment 88276 [details] [review]
Bug 15400: (follow-up) Adding age to check out search dropdown

Confirm age shows in the suggestions dropdown when using the checkout
search in header (if user set DOB).
Confirm 'Age unknown' shows if no DOB set.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 33 Josef Moravec 2019-04-18 09:28:51 UTC
Created attachment 88277 [details] [review]
Bug 15400: (follow-up) Restore 'years' string, remove untranslatable string
Comment 34 Josef Moravec 2019-04-18 09:28:55 UTC
Created attachment 88278 [details] [review]
Bug 15400: (follow-up) Add class to years span
Comment 35 Josef Moravec 2019-04-18 09:29:45 UTC
(In reply to Katrin Fischer from comment #29)
> Hi Josef,
> 
> this works nicely, with one exception: on the guarantors search the number
> doesn't show, only ( years).

Sorry, I can't reproduce it now...

> 
> As there has been some controversy about showing this information - could
> you consider wrapping a span with a class around the years part?

Done in folow-up
> 
> Thx!

Thanks for testing ;)
Comment 36 Katrin Fischer 2019-04-24 21:30:50 UTC
> As there has been some controversy about showing this information - could
> you consider wrapping a span with a class around the years part?

Hi Josef, totally my fault for not being clear :( ... I meant a span around the _whole_ age (number + text). So you can choose not to see it. 

Guarantor search is ok now (not sure what happened before) - just this little bit left.
Comment 37 Josef Moravec 2019-04-26 05:59:44 UTC
Created attachment 88845 [details] [review]
Bug 15400: (follow-up) Add class to years span
Comment 38 Josef Moravec 2019-04-26 06:00:45 UTC
Created attachment 88846 [details] [review]
Bug 15400: (follow-up) Add class to years span
Comment 39 Katrin Fischer 2019-04-27 13:25:20 UTC
Created attachment 88977 [details] [review]
Bug 15400: Display date of birth and age more consistantly

Test plan:
0) Apply the patch
1) Go to all of these pages
    Patron detail
    Other patron pages - look on the left side (circ-menu)
    Patron search
    Guarantor search ( go to child patron -> edit -> in guarantor
        section click "Set to patron"
    Search through "Check out" (in the header)

2) Confirm that does show date of birth and date consistantly,
    try it on patrons with and without date of birth set to find
    possible reggressions

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 40 Katrin Fischer 2019-04-27 13:25:25 UTC
Created attachment 88978 [details] [review]
Bug 15400: (follow-up) Updating text display

Now shows as 'Born: [date of birth] (age)' in circ sidebar menu and
search results

Sponsored-by: Catalyst IT

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 41 Katrin Fischer 2019-04-27 13:25:31 UTC
Created attachment 88979 [details] [review]
Bug 15400: (follow-up) Adding age to check out search dropdown

Confirm age shows in the suggestions dropdown when using the checkout
search in header (if user set DOB).
Confirm 'Age unknown' shows if no DOB set.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 42 Katrin Fischer 2019-04-27 13:25:36 UTC
Created attachment 88980 [details] [review]
Bug 15400: (follow-up) Restore 'years' string, remove untranslatable string

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 43 Katrin Fischer 2019-04-27 13:25:41 UTC
Created attachment 88981 [details] [review]
Bug 15400: (follow-up) Add class to years span

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 44 Nick Clemens 2019-04-30 12:11:05 UTC
Needs a minor rebase
Comment 45 Josef Moravec 2020-03-03 19:25:39 UTC
Created attachment 100047 [details] [review]
Bug 15400: Display date of birth and age more consistantly

Test plan:
0) Apply the patch
1) Go to all of these pages
    Patron detail
    Other patron pages - look on the left side (circ-menu)
    Patron search
    Guarantor search ( go to child patron -> edit -> in guarantor
        section click "Set to patron"
    Search through "Check out" (in the header)

2) Confirm that does show date of birth and date consistantly,
    try it on patrons with and without date of birth set to find
    possible reggressions

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 46 Josef Moravec 2020-03-03 19:25:47 UTC
Created attachment 100048 [details] [review]
Bug 15400: (follow-up) Updating text display

Now shows as 'Born: [date of birth] (age)' in circ sidebar menu and
search results

Sponsored-by: Catalyst IT

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 47 Josef Moravec 2020-03-03 19:25:52 UTC
Created attachment 100049 [details] [review]
Bug 15400: (follow-up) Adding age to check out search dropdown

Confirm age shows in the suggestions dropdown when using the checkout
search in header (if user set DOB).
Confirm 'Age unknown' shows if no DOB set.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 48 Josef Moravec 2020-03-03 19:25:57 UTC
Created attachment 100050 [details] [review]
Bug 15400: (follow-up) Restore 'years' string, remove untranslatable string

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 49 Josef Moravec 2020-03-03 19:26:02 UTC
Created attachment 100051 [details] [review]
Bug 15400: (follow-up) Add class to years span

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 50 Josef Moravec 2020-03-03 19:27:48 UTC
Rebased on master.

This was PQA before, but as it was so long then I finally rebased it (sorry for that!) I am marking it back to signed off state.
Comment 51 Josef Moravec 2020-03-03 19:28:19 UTC
*** Bug 24770 has been marked as a duplicate of this bug. ***
Comment 52 Michal Denar 2020-03-03 20:03:29 UTC
Created attachment 100065 [details] [review]
Bug 15400: Display date of birth and age more consistantly

Test plan:
0) Apply the patch
1) Go to all of these pages
    Patron detail
    Other patron pages - look on the left side (circ-menu)
    Patron search
    Guarantor search ( go to child patron -> edit -> in guarantor
        section click "Set to patron"
    Search through "Check out" (in the header)

2) Confirm that does show date of birth and date consistantly,
    try it on patrons with and without date of birth set to find
    possible reggressions

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 53 Michal Denar 2020-03-03 20:03:33 UTC
Created attachment 100066 [details] [review]
Bug 15400: (follow-up) Updating text display

Now shows as 'Born: [date of birth] (age)' in circ sidebar menu and
search results

Sponsored-by: Catalyst IT

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 54 Michal Denar 2020-03-03 20:03:38 UTC
Created attachment 100067 [details] [review]
Bug 15400: (follow-up) Adding age to check out search dropdown

Confirm age shows in the suggestions dropdown when using the checkout
search in header (if user set DOB).
Confirm 'Age unknown' shows if no DOB set.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 55 Michal Denar 2020-03-03 20:03:43 UTC
Created attachment 100068 [details] [review]
Bug 15400: (follow-up) Restore 'years' string, remove untranslatable string

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 56 Michal Denar 2020-03-03 20:03:48 UTC
Created attachment 100069 [details] [review]
Bug 15400: (follow-up) Add class to years span

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 57 Jonathan Druart 2020-03-04 13:44:00 UTC
+        [%- IF ( patron.get_age ) %] ([% patron.get_age | html %] years)
+        [%- ELSIF ( patron.age ) %] ([% patron.age | html %] years)[% END -%]

That smells.
You should either test for the type of patron, or pass another variable
  patron_object vs patron
or
  patron vs borrower (that reads wrong but it is what is usually done in controllers)
Comment 58 Jonathan Druart 2020-03-04 13:51:58 UTC
Created attachment 100118 [details] [review]
Bug 15400: Clarify usage of patron-age.inc
Comment 59 Jonathan Druart 2020-03-04 13:55:02 UTC
(In reply to Jonathan Druart from comment #57)
> +        [%- IF ( patron.get_age ) %] ([% patron.get_age | html %] years)
> +        [%- ELSIF ( patron.age ) %] ([% patron.age | html %] years)[% END
> -%]
> 
> That smells.
> You should either test for the type of patron, or pass another variable
>   patron_object vs patron
> or
>   patron vs borrower (that reads wrong but it is what is usually done in
> controllers)

Sorry, I was reading the patch and not the final change. I added a follow-up.

However I still think it's lot of info that could be considered not needed by some.
Especially in the circ autocomplete.

Letting someone else adding the QA stamp.
Comment 60 Katrin Fischer 2020-03-22 16:17:15 UTC
Applying these patches, patron search does no longer work for me:
SyntaxError: JSON.parse: bad control character in string literal at line 22 column 20 of the JSON data

Please double check!
Comment 61 Aleisha Amohia 2020-04-01 04:23:33 UTC
I'm getting a different error that I'm not sure how to fix

Source map error: Error: request failed with status 404
Resource URL: http://localhost:8081/intranet-tmpl/lib/datatables/datatables.min_19.1200060.js
Source Map URL: pdfmake.min.js.map

Anyone?
Comment 62 Josef Moravec 2020-04-21 13:22:03 UTC
Created attachment 103373 [details] [review]
Bug 15400: (follow-up) Remove line break
Comment 63 Josef Moravec 2020-04-21 13:23:07 UTC
(In reply to Katrin Fischer from comment #60)
> Applying these patches, patron search does no longer work for me:
> SyntaxError: JSON.parse: bad control character in string literal at line 22
> column 20 of the JSON data
> 
> Please double check!

I fixed the bad line break, should be OK now.
Comment 64 Josef Moravec 2020-04-21 13:24:19 UTC
(In reply to Aleisha Amohia from comment #61)
> I'm getting a different error that I'm not sure how to fix
> 
> Source map error: Error: request failed with status 404
> Resource URL:
> http://localhost:8081/intranet-tmpl/lib/datatables/datatables.min_19.1200060.
> js
> Source Map URL: pdfmake.min.js.map
> 
> Anyone?

I do not think it is related with this bug anyhow...
Comment 65 Katrin Fischer 2020-06-21 16:42:35 UTC
Created attachment 106133 [details] [review]
Bug 15400: Display date of birth and age more consistantly

Test plan:
0) Apply the patch
1) Go to all of these pages
    Patron detail
    Other patron pages - look on the left side (circ-menu)
    Patron search
    Guarantor search ( go to child patron -> edit -> in guarantor
        section click "Set to patron"
    Search through "Check out" (in the header)

2) Confirm that does show date of birth and date consistantly,
    try it on patrons with and without date of birth set to find
    possible reggressions

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 66 Katrin Fischer 2020-06-21 16:42:39 UTC
Created attachment 106134 [details] [review]
Bug 15400: (follow-up) Updating text display

Now shows as 'Born: [date of birth] (age)' in circ sidebar menu and
search results

Sponsored-by: Catalyst IT

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 67 Katrin Fischer 2020-06-21 16:42:44 UTC
Created attachment 106135 [details] [review]
Bug 15400: (follow-up) Adding age to check out search dropdown

Confirm age shows in the suggestions dropdown when using the checkout
search in header (if user set DOB).
Confirm 'Age unknown' shows if no DOB set.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 68 Katrin Fischer 2020-06-21 16:42:49 UTC
Created attachment 106136 [details] [review]
Bug 15400: (follow-up) Restore 'years' string, remove untranslatable string

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 69 Katrin Fischer 2020-06-21 16:42:54 UTC
Created attachment 106137 [details] [review]
Bug 15400: (follow-up) Add class to years span

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 70 Katrin Fischer 2020-06-21 16:43:01 UTC
Created attachment 106138 [details] [review]
Bug 15400: Clarify usage of patron-age.inc

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 71 Katrin Fischer 2020-06-21 16:43:07 UTC
Created attachment 106139 [details] [review]
Bug 15400: (follow-up) Remove line break

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 72 Katrin Fischer 2020-06-21 16:43:13 UTC
Created attachment 106140 [details] [review]
Bug 15400: Add class on patron brief info to allow hiding date of birth

This just makes a small addition by adding a class to the new
"Born:" entry in the patron brief information area to allow for hiding
it easily with css.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 73 Jonathan Druart 2020-06-25 09:06:46 UTC
There is a misalignment: https://snipboard.io/EqYJmM.jpg

Why did you use the .label class for "Born"?
Comment 74 Josef Moravec 2020-06-25 09:52:30 UTC
(In reply to Jonathan Druart from comment #73)
> There is a misalignment: https://snipboard.io/EqYJmM.jpg
> 
> Why did you use the .label class for "Born"?

I do not really remember that.... so probably we could remove it, if someone want to hide the word "Born" it is possible through the class added in last Katrin's follow-up (thanks for that!)
Comment 75 Jonathan Druart 2020-06-25 10:09:46 UTC
Are you willing to fix the alignment issue, Josef?
Comment 76 Josef Moravec 2020-06-25 15:09:09 UTC
Created attachment 106307 [details] [review]
Bug 15400: (follow-up) Remove unnecessary class

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 77 Josef Moravec 2020-06-25 15:09:51 UTC
(In reply to Jonathan Druart from comment #75)
> Are you willing to fix the alignment issue, Josef?

Yes, it it done now
Comment 78 Jonathan Druart 2020-06-29 11:50:09 UTC
Pushed to master for 20.11, thanks to everybody involved!