Bug 24017 - Search for year of birth
Summary: Search for year of birth
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-12 14:35 UTC by Christian Stelzenmüller
Modified: 2020-04-23 11:41 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Stelzenmüller 2019-11-12 14:35:56 UTC
Searching for the year of birth would be nice.

Either in the searchfield "date of birth", or in an extra field.
Comment 1 Nick Clemens (kidclamp) 2020-04-23 11:41:24 UTC
You can add date of birth to the search form, however, if you try simply searching by year the search is returned empty

C4::Utils::DataTables::Members->Search

 66     if ( $searchfieldstype eq 'dateofbirth' ) {
 67         # Return an empty list if the date of birth is not correctly formatted
 68         $searchmember = eval { output_pref( { str => $searchmember, dateformat => 'iso', dateonly => 1 } ); };
 69         if ( $@ or not $searchmember ) {
 70             return {
 71                 iTotalRecords        => $iTotalRecords,
 72                 iTotalDisplayRecords => 0,
 73                 patrons              => [],
 74             };
 75         }
 76     }