Bug 28384: Add 'no_items' option to TransformMarcToKoha
authorNick Clemens <nick@bywatersolutions.com>
Wed, 19 May 2021 10:19:33 +0000 (10:19 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 16 Jul 2021 13:32:12 +0000 (09:32 -0400)
commit4895ea295bdd9f7dba270424e1fe1e2879e2c1a3
tree476f1ababd9cab3efbc033dcab4acceee5e4f85f
parent6d029fe92648b6293568d32ffec9f1eb79f1cb43
Bug 28384: Add 'no_items' option to TransformMarcToKoha

This patch adds a new option 'no_items' and uses it in the C4::Search::searchResults
routine. We don't use the item info fetched here, so skipping those lines saves us time.

Additionally, I fix an incorrect FIXME comment, and pass the ISBN returned by the routine above
into GetNormalizedISBN to save another lookup

TO test:
1 - Enable AmazonCoverImages system preference
2 - Search staff client with a term that returns books with covers
3 - Apply patch
4 - prove -v t/db_dependent/Biblio/TransformMarcToKoha.t
5 - Confirm searching works
6 - Confirm Amazon images display (normalized_isbn is used for these)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Amended, replacing a tab character.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/Biblio.pm
C4/Search.pm
t/db_dependent/Biblio/TransformMarcToKoha.t