[Koha-bugs] [Bug 25082] Unknown language code if 041 $a is linked to an authorized value list

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu May 7 13:55:08 CEST 2020


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

Jonathan Druart <jonathan.druart at bugs.koha-community.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #104355|0                           |1
        is obsolete|                            |
 Attachment #104379|0                           |1
        is obsolete|                            |

--- Comment #28 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 104497
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104497&action=edit
Bug 25082: Make 041 descriptions display, if authorised value list is used

When 041$a or another subfield is linked to an authorised value list,
Koha will replace the codes with the descriptions from the authorised
value in the MARCXML before passing it to the XSLT.

The XSLT was made to translate codes into descriptions - as there is
no code now, this fails and 'unknown language' is shown.

The patch changes the handling so that when the XSLT is handled something
that doesn't match a known code, it displays the subfield without
processing.

To test:
- Create some records with 041.
  Examples: http://www.loc.gov/marc/bibliographic/bd041.html
- Verify this displays nicely in staff and OPAC
- Apply patch
- Verify display is unchanged
- Remove the patch
- Change one of your MARC frameworks (use another framework than
  for your first test records)
  and link the 041 subfields to the LANG authorised value list
- Go to administration and create some entries for LANG with language
  codes and descriptions
- Catalog a 041 using the normal editor (not advanced)
- You can now use a pull down to select the values you want
- Verify the display is now 'Unknown language' for this record
- Apply patch
- Verify all records display the language descriptions now, using
  an authorised value or not
- Run misc/maintenance/generate_MARC21Languages.pl

Verify the output at the end reads like:
<xsl:otherwise>
    <!-- when 041\$a is mapped to an authorised value list, this will show the
description -->
    <xsl:value-of select="\$code" />
</xsl:otherwise>

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel at gmail.com>
Amended test plan (add remove patch) to verify the error
Work as described following test plan, no errors.

Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>

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


More information about the Koha-bugs mailing list