[Koha-bugs] [Bug 24366] Merging biblioitems should happen in Koha::Biblio->to_api

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jan 7 20:48:50 CET 2020


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

--- Comment #4 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 96959
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96959&action=edit
Bug 24366: Merge biblioitem in Koha::Biblio->to_api

This patch moves the bilbioitem object merge into the
Koha::Biblio->to_api method, as opposed to doing it in the controller.
This is an inevitable change as other endpoints might require to embed
biblio objects, and they need to carry the biblioitem information.

Also, if we merge the tables, the transition will be straightforward
(remove the tests this patch introduces, and merge the mappings from
Koha::Biblioitem into Koha::Biblio).

To test:
1. Apply this patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Biblio.t \
           t/db_dependent/api/v1/biblios.t
=> SUCCESS: Tests pass! i.e. the new to_api method is tested, and the
API tests don't expect any behavior change.
3. Sign off :-D

Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>

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


More information about the Koha-bugs mailing list