[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 20 17:37:33 CEST 2023


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

Sam Lau <samalau at gmail.com> changed:

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

--- Comment #7 from Sam Lau <samalau at gmail.com> ---
Created attachment 152488
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152488&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>

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


More information about the Koha-bugs mailing list