]> git.koha-community.org Git - koha.git/commit
Bug 32505: Restore patron search by formatted dob
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 2 Jan 2023 16:12:40 +0000 (17:12 +0100)
committerLucas Gass <lucas@bywatersolutions.com>
Fri, 20 Jan 2023 20:51:12 +0000 (20:51 +0000)
commit15f8d8c93165aad168aa145290bd076cd0ab80d7
treef668230a5811282557c42177fc9d3bc995c067c1
parent715afc2826f9794af3b47c652f02c1d3438ebae1
Bug 32505: Restore patron search by formatted dob

Prior to the rewrite of the patron searches (bug 30063 and friends) it
was possible to search for a patron using their date of birth, formatted
following the dateformat syspref.

Now it only works if the date is iso formatted.

This patch is providing a fix to restore the behaviour, but does not
make it consistent. Only searching patrons by date of birth is fixed
here, when we actually want to fix the problem for the REST API DT
wrapper instead.

Test plan:
Search for patrons given their date of birth. You need to select "date
of birth" in the "Search field" dropdown, or set it in
DefaultPatronSearchFields.

Note that the column filtering is still not working, but I guess it was
the case already in older versions. Ideally we will need to have a
"datatype" attribute passed to the the 'th' and retrieved from
datatables.js to add this same trick and build the query appropriately.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit aa1f97c2ea4376f5c3232846038c224c927dddc8)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 6e7f7c926f991c641e034f19cd493830c46fd95f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc