Bug 25269 - MARC21slim2OPACResults.xsl does not display all formats (physical descriptions)
Summary: MARC21slim2OPACResults.xsl does not display all formats (physical descriptions)
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Lucas Gass
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-23 20:32 UTC by Lucas Gass
Modified: 2020-11-30 21:45 UTC (History)
3 users (show)

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


Attachments
Bug 25269: Add text along with icons for physical descriptions (7.42 KB, patch)
2020-04-23 20:58 UTC, Lucas Gass
Details | Diff | Splinter Review
screenshot showing the optical disc when it shouldn't happen on step 4 of test plan (32.01 KB, image/png)
2020-05-19 13:24 UTC, Victor Grousset/tuxayo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass 2020-04-23 20:32:57 UTC
In MARC21slim2OPACResults.xsl we set the 'Format' or physical description by a combination of the 007 first position and 007 second position.

In most cases this displays some text (example: chip cartridge or magneto-optical disc)

But some set an png icon instead of any text. Like:

<img src="/opac-tmpl/lib/famfamfam/world.png" alt="earth moon globe" class="format"/>

These will not display at all that is because of this:

    <xsl:if test="string-length(normalize-space($physicalDescription))">
         <span class="results_format">
             <span class="label">; Format: </span><xsl:copy-of select="$physicalDescription"></xsl:copy-of>
         </span>
    </xsl:if>


Without any text the string length is 0 and nothing at all displays. We need to add text along with each png icon.
Comment 1 Lucas Gass 2020-04-23 20:37:40 UTC
To Recreate:

1. Edit a record to have the first and second postions in the 008 = 'cb'.
2. Load the OPAC results page and this record should display: Format: chip cartridge 
3. Now try first and second positions in the 008 = 'co'
4. This should an optical disc png (/opac-tmpl/lib/famfamfam/cd.png) but nothing displays because the string length is 0.
Comment 2 Lucas Gass 2020-04-23 20:58:44 UTC
Created attachment 103607 [details] [review]
Bug 25269: Add text along with icons for physical descriptions

1. Edit a record to have the first and second postions in the 008 = 'cb'.
2. Load the OPAC results page and this record should display: Format: chip cartridge
3. Now try first and second positions in the 008 = 'co'
4. This should an optical disc png (/opac-tmpl/lib/famfamfam/cd.png) but nothing displays because the string length is 0.
5. Apply patch
6. Record with first and second positions in the 008 = 'co' should now should text and icon.
7. Look at patch and make sure other changed parts also work.
Comment 3 Lucas Gass 2020-04-23 21:24:18 UTC
There are some inconsistencies between the OPAC and staff XSLT in this area. I have opened bug 25270.
Comment 4 Annette 2020-04-27 15:57:39 UTC
The material type "Music" has a number of different formats.  When a search for a certain item returns results for different formats for the same item (e.g., Gershwin recording of "Swanee") the list could contain a sound disc, roll, and a  cassette. It is helpful to be able to tell right away from the results list which formats are available.
Comment 5 Victor Grousset/tuxayo 2020-05-19 13:21:04 UTC
> 1. Edit a record to have the first and second postions in the 008 = 'cb'.

You mean 007 right?
Comment 6 Victor Grousset/tuxayo 2020-05-19 13:24:20 UTC
Created attachment 105092 [details]
screenshot showing the optical disc when it shouldn't happen on step 4 of test plan

No issues until this step:

> 4. This should an optical disc png (/opac-tmpl/lib/famfamfam/cd.png) but nothing displays because the string length is 0.

As the attached screenshot shows, the optical disc image is already there!
Comment 7 Katrin Fischer 2020-05-22 12:02:58 UTC
Hi Victor, looking at the patch, I think this is about displaying the description text, not about the icons. I am setting to to FQA as I think we should fix the commit message.
Comment 8 Katrin Fischer 2020-05-22 12:03:09 UTC
007 vs. 008
Comment 9 Lucas Gass 2020-05-22 22:37:50 UTC
I think this can be marked as invalid.