[Koha-bugs] [Bug 28709] Fetching biblio objects for custom covers is innefficient

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jul 13 20:31:35 CEST 2021


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

--- Comment #1 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 122832
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122832&action=edit
Bug 28709: Refactor Koha::Biblio->custom_cover_image_url to allow passing
parameters

Currently the search result template receive a Koha::Biblio object and call the
method.

The searchResults routine already has the isbn, issn, and normalized_isbn
calculated.
Rather than fetching the object and passing to the template we can pass the
parameters,
generate the url, and pass only the URL to the template

To test:
1 - Set the system preferences:
    CustomCoverImages : Display
    OPACCustomCoverImages: Display
    CustomCoverImagesURL:
https://images-na.ssl-images-amazon.com/images/P/{normalized_isbn}.01.LZZZZZZZ.jpg
2 - Search on staff and opac for a term that returns titles with covers, e.g.
'shuffle'
3 - Confirm the covers show
4 - Apply patch
5 - Restart all
6 - Confirm covers still show
7 - prove -v t/db_dependent/Koha/Biblios.t

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


More information about the Koha-bugs mailing list