Bug 39703

Summary: Add the ability to have multiple CustomCoverImages
Product: Koha Reporter: Caroline Cyr La Rose <caroline.cyr-la-rose>
Component: System AdministrationAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Caroline Cyr La Rose 2025-04-22 20:47:50 UTC
Some implementations of CutomCoverImages are an URL in a MARC field (we often use 956$u in our installations). It would be nice if, if there are multiple occurrences of the field, all the images would be displayed. Currently, only one appears, even if AllowMultipleCovers is set to "Allow".

To recreate:
1. Make sure 956 is available in the default framework
   1.1. Go to Administration > MARC bibliographic framework
   1.2. Click "Actions" > "MARC structure" next to the default framework
   1.3. Search for 956
   1.4. Click "Actions" > "Edit subfields"
   1.5. Click "u"
   1.6. Check "Editor" under Advanced constraints > Visibility
   1.7. Click "Save changes"

2. Enable AllowMultipleCovers
   2.1. Go to Administration > System preferences
   2.2. Search for AllowMultipleCovers
   2.3. Change to "Allow"
   2.4. Click "Save all Enhanced content preferences"

3. Enable CustomCoverImages
   3.1. Go to Administration > System preferences
   3.2. Search for CustomCoverImages
   3.3. Change CustomCoverImages to "Show"
   3.4. Change OPACCustomCoverImages to "Show"
   3.5. Change CustomCoverImagesURL to "{956$u}"
   3.6. Click "Save all Enhanced content preferences"

4. Add image links in a record
   4.1. Create a new record or edit an existing record (for example, record 285 http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=285)
        4.1.1. If using an existing record, make sure to use the default framework (Settings > Change framework > Default)
   4.2. Go to 956
   4.3. Enter a link to an image file in 956$u (for example https://gutenberg.org/files/1041/1041-h/images/cover.jpg)
   4.4. Click the button to duplicate the field
   4.5. Enter a second link to a second image file in the second 956 (for example https://www.gutenberg.org/cache/epub/1041/pg1041.cover.medium.jpg)
   4.6. Click "Save"

5. View the record in the staff interface
   --> Only one image is displayed, no slider