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

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Nov 15 15:43:08 CET 2021


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

Jonathan Druart <jonathan.druart+koha at gmail.com> changed:

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

--- Comment #9 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
Created attachment 127657
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127657&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 watching all bug changes.


More information about the Koha-bugs mailing list