Bug 33193 - Book cover image visibility depends on the order of 856 fields
Summary: Book cover image visibility depends on the order of 856 fields
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: 22.11
Hardware: PC Windows
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-10 11:02 UTC by Tuomas Kunttu
Modified: 2023-08-04 07:40 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tuomas Kunttu 2023-03-10 11:02:43 UTC
Book cover link is in Marc field 856 and book description link is in another 856 field. Whether the book cover image is visible depends on the order in which the data is catalogued.

Test:
1. System preferences: CustomCoverImages: display and CustomCoverImagesURL: {856$u}
2. Catalogue following data to a record:

856 42     
u    https://sopimusasiakkaat.booky.fi/description.php?ean=9789518734263
q    text
z    Description
856 42     
u    https://sopimusasiakkaat.booky.fi/image.php?size=medium&id=9789518734263
q    image
z    Cover image

3. Save and view record
4. Book cover is not visible in record's normal view nor in search results list.
5. Change the order of 856 fields:

856 42     
u    https://sopimusasiakkaat.booky.fi/image.php?size=medium&id=9789518734263
q    image
z    Cover image
856 42     
u    https://sopimusasiakkaat.booky.fi/description.php?ean=9789518734263
q    text
z    Description

6. Save and view record
7. Book cover is visible in record's normal view and in search results list.

Book cover image should be visible regardless of the order in which the 856 fields are catalogued.
Comment 1 Katrin Fischer 2023-03-10 13:48:47 UTC
I feel like this is asking too much of CustomCoverImagesURL. In order to make this work, we'd need a complex way to specificy which repeated fields it should look at. In this case we'd need to be able to specify that it also should filter on $q being image.

Especially since $q is not cataloged to the standard here:

https://www.loc.gov/marc/bibliographic/bd856.html
$q - Electronic format type

Identification of the electronic format type and version. Electronic format type should be specified with a code from the list of registered Internet Media Types (MIME types), taken from: IANA Media Types. If necessary (e.g., in order to specify a file format version to support access or digital preservation) additional information, such as PRONOM Unique Identifier (PUID) codes, may be included in addition to the information provided by the MIME Type by repeating subfield $q.


Maybe OPACDisplay856uAsImage would work better here or we could improve on that pref.
Comment 2 Anneli Österman 2023-08-04 07:40:33 UTC
Do we need to look at the q field? Could it just go through all the 856u fields?

We do not use Koha's opac in Koha-Suomi's libraries so OPACDisplay856uAsImage systempreference is not ideal for us. Also the problem is in staff interface so opac syspref doesn't sound right to me. :)