[Koha-bugs] [Bug 33974] Add ability to search biblios endpoint any biblioitem attribute
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Jun 27 18:04:21 CEST 2023
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33974
--- Comment #10 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 152766
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152766&action=edit
Bug 33974: Make biblioitem columns searchable in a generic way
This patch makes biblioitem attributes be searchable on the biblios
endpoint. It does so by using the new method in Koha::Biblios, and by
adjusting objects.search(_rs) to accept a $query_fixer arrayref of
functions to be applied to each query or order_by parameters.
The result is cleaner code to write, but complex internals.
To test:
1. Apply this patch
2. Run:
$ ktd --shell
k$ prove t/db_dependent/api/v1/biblios.t
=> SUCCESS: Tests pass! Searching for biblioitem attributes works on the
API!
3. Sign off :-D
Signed-off-by: Sam Lau <samalau at gmail.com>
Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list