[Koha-bugs] [Bug 28585] Cannot search on date fields

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Jun 26 01:32:39 CEST 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28585

David Nind <david at davidnind.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #122445|0                           |1
        is obsolete|                            |

--- Comment #13 from David Nind <david at davidnind.com> ---
Created attachment 122458
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122458&action=edit
Bug 28585: Use the datetime_parser for handling API dates

This patchset takes the GET /patrons route as a sample usage for filtering
on date and date-time (including timestamp) fields.

It then makes Koha::Object->attributes_from_api use the DB storage
datetime parser for format the parameters correctly.

To test:

1. Apply the regression tests
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/patrons.t
=> FAIL: It doesn't find the patron when filtering by date
3. Apply this patch
4. Repeat 2
=> SUCCESS: It works now!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>

Signed-off-by: David Nind <david at davidnind.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list