[Koha-bugs] [Bug 31207] The OPAC Shelf browser fails to display local cover images

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jul 22 14:26:11 CEST 2022


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

ByWater Sandboxes <bws.sandboxes at gmail.com> changed:

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

--- Comment #11 from ByWater Sandboxes <bws.sandboxes at gmail.com> ---
Created attachment 138016
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138016&action=edit
Bug 31207: Fix the display of local cover images in the OPAC Shelf browser

In the OPAC Details page for a biblio, opening the Shelf browser
results in a nice display of adjacent items next to each other
based on their call number, which also shows any cover images
found. Since 21.11.00 this has been broken when local covers are
exclusively in use, as it fails to fetch the related images that
have been uploaded *at the biblio level*.

This patch fixes that by adding back TT code that was removed
in commit fad97080e97da5bc77724c68b9394aba15518847 (Bug 28180).

Test plan:

0) Under Home > Administration > System preferences:
   - in section 'OPAC -> Shelf browser', make sure OPACShelfBrowser
     is enabled (i.e. set to 'Show')
   - in section 'Enhanced content -> Local or remote cover images',
     make sure both LocalCoverImages and OPACLocalCoverImages
     are enabled (i.e. set to 'Show')
   - make sure no other cover image provider is enabled
   - make sure OpacSeparateHoldings and OpacSeparateHoldingsBranch
     are set to 'Don't separate' and 'home library', respectively

1) In the Staff interface, create a record that has:
   - a local cover image at the biblio level (use the 'Images' tab
     in the Details page of the record to upload a test image)
   - at least one item attached to it that has a Call number (the
     call number value can be anything -- it's only needed to
     trigger the display of the 'Browse shelf' hyperlink)

2) In the OPAC, visit the Details page of the record you just added
   the cover image to, and click on the 'Browse shelf' link found
   in the 'Call number' column. When the Shelf browser expands,
   you'll notice there's no cover image displayed for the item(s)
   that belong to your test biblio.

3) Apply the patch and refresh the OPAC biblio Details page.
   This time the shelf browser should display the local cover images
   associated with your test record.

4) Make sure the relevant unit test passes:

   prove -v t/db_dependent/ShelfBrowser.t

Signed-off-by: Sally <sally.healey at cheshiresharedservices.gov.uk>

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


More information about the Koha-bugs mailing list