Bug 39507: Make the MARC21 008 plugin more precise for MU

According to https://loc.gov/marc/bibliographic/bd008m.html, the content
of 008/24-29 and 008/30-31 fr Music (leader/6 = c, d, i, or j) is made
of one character codes (as it is the case for 008/24-27 for Books).
Now, in Koha 008/24-29 and 008/30-31 are input fields with no
possibility to chose the code from a list. This could (and should)
be improved.

Test plan:
==========
1. Open a standard biblio editor, chose the plugin for 008 field,
   change Type of Material to MU - Music. See that 24-29 and 30-31
   (Accompanying matter and Literary text for sound recordings )are
   multi character input fields.
2. Apply the patch ; restart_all.
3. Repeat p. 1. See that now 24-29 and 30-31 are split in a series
   of one-character drop-down menus.

BTW a link to a list of codes for 'Form of composition' (008/18-19)
has been also added.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Janusz Kaczmarek 2025-04-01 11:46:41 +00:00 committed by Lucas Gass
parent 09c3ae4c86
commit ebc3df7692
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 112 additions and 3 deletions

View File

@ -747,7 +747,7 @@
<Value code="[aa#]"><description>Two-character alphabetic code</description></Value>
<Value code="[aaa]"><description>Three-character alphabetic code</description></Value>
</Position>
<Position pos="18-19"><name>Form of composition</name><description>Two-character alphabetic code that indicates the form of composition. Codes are based on Library of Congress subject headings. If more than one code is appropriate, the code mu (Multiple forms) is used in 008/18-19 and all appropriate specific codes are given in field 047 (Form of Composition). Code mu (Multiple forms) may also signify that field 047 (Form of Composition) contains non-MARC composition codes.</description>
<Position pos="18-19" url="https://www.loc.gov/marc/bibliographic/bd008m.html"><urltext>MARC codes for Form of composition</urltext><name>Form of composition</name><description>Two-character alphabetic code that indicates the form of composition. Codes are based on Library of Congress subject headings. If more than one code is appropriate, the code mu (Multiple forms) is used in 008/18-19 and all appropriate specific codes are given in field 047 (Form of Composition). Code mu (Multiple forms) may also signify that field 047 (Form of Composition) contains non-MARC composition codes.</description>
<Value code="an"><description>Anthems</description></Value>
<Value code="bd"><description>Ballads</description></Value>
<Value code="bg"><description>Bluegrass music</description></Value>
@ -875,7 +875,7 @@
<Value code="s"><description>Electronic</description></Value>
<Value code="|"><description>No attempt to code</description></Value>
</Position>
<Position pos="24-29"><name>Accompanying matter</name><description>Up to six one-character alphabetic codes (recorded in alphabetical order) that indicate the contents of program notes and other accompanying material for sound recording, music manuscripts, or notated music. If fewer than six codes are assigned, the codes are left justified and each unused position contains a blank (#).</description>
<Position pos="24"><name>Accompanying matter - code 1</name><description>Up to six one-character alphabetic codes (recorded in alphabetical order) that indicate the contents of program notes and other accompanying material for sound recording, music manuscripts, or notated music. If fewer than six codes are assigned, the codes are left justified and each unused position contains a blank (#).</description>
<Value code="#"><description>No accompanying matter</description></Value>
<Value code="a"><description>Discography</description></Value>
<Value code="b"><description>Bibliography</description></Value>
@ -892,7 +892,116 @@
<Value code="z"><description>Other</description></Value>
<Value code="|"><description>No attempt to code</description></Value>
</Position>
<Position pos="30-31"><name>Literary text for sound recordings</name><description>Up to two one-character codes (recorded in the order of the following list) that indicate the type of literary text contained in a nonmusical sound recording. If only one code is assigned, it is left justified and the unused position contains a blank (#).</description>
<Position pos="25"><name>Accompanying matter - code 2</name><description>Up to six one-character alphabetic codes (recorded in alphabetical order) that indicate the contents of program notes and other accompanying material for sound recording, music manuscripts, or notated music. If fewer than six codes are assigned, the codes are left justified and each unused position contains a blank (#).</description>
<Value code="#"><description>No accompanying matter</description></Value>
<Value code="a"><description>Discography</description></Value>
<Value code="b"><description>Bibliography</description></Value>
<Value code="c"><description>Thematic index</description></Value>
<Value code="d"><description>Libretto or text</description></Value>
<Value code="e"><description>Biography of composer or author</description></Value>
<Value code="f"><description>Biography of performer or history of ensemble</description></Value>
<Value code="g"><description>Technical and/or historical information on instruments</description></Value>
<Value code="h"><description>Technical information on music</description></Value>
<Value code="i"><description>Historical information</description></Value>
<Value code="k"><description>Ethnological information</description></Value>
<Value code="r"><description>Instructional materials</description></Value>
<Value code="s"><description>Music</description></Value>
<Value code="z"><description>Other</description></Value>
<Value code="|"><description>No attempt to code</description></Value>
</Position>
<Position pos="26"><name>Accompanying matter - code 3</name><description>Up to six one-character alphabetic codes (recorded in alphabetical order) that indicate the contents of program notes and other accompanying material for sound recording, music manuscripts, or notated music. If fewer than six codes are assigned, the codes are left justified and each unused position contains a blank (#).</description>
<Value code="#"><description>No accompanying matter</description></Value>
<Value code="a"><description>Discography</description></Value>
<Value code="b"><description>Bibliography</description></Value>
<Value code="c"><description>Thematic index</description></Value>
<Value code="d"><description>Libretto or text</description></Value>
<Value code="e"><description>Biography of composer or author</description></Value>
<Value code="f"><description>Biography of performer or history of ensemble</description></Value>
<Value code="g"><description>Technical and/or historical information on instruments</description></Value>
<Value code="h"><description>Technical information on music</description></Value>
<Value code="i"><description>Historical information</description></Value>
<Value code="k"><description>Ethnological information</description></Value>
<Value code="r"><description>Instructional materials</description></Value>
<Value code="s"><description>Music</description></Value>
<Value code="z"><description>Other</description></Value>
<Value code="|"><description>No attempt to code</description></Value>
</Position>
<Position pos="27"><name>Accompanying matter - code 4</name><description>Up to six one-character alphabetic codes (recorded in alphabetical order) that indicate the contents of program notes and other accompanying material for sound recording, music manuscripts, or notated music. If fewer than six codes are assigned, the codes are left justified and each unused position contains a blank (#).</description>
<Value code="#"><description>No accompanying matter</description></Value>
<Value code="a"><description>Discography</description></Value>
<Value code="b"><description>Bibliography</description></Value>
<Value code="c"><description>Thematic index</description></Value>
<Value code="d"><description>Libretto or text</description></Value>
<Value code="e"><description>Biography of composer or author</description></Value>
<Value code="f"><description>Biography of performer or history of ensemble</description></Value>
<Value code="g"><description>Technical and/or historical information on instruments</description></Value>
<Value code="h"><description>Technical information on music</description></Value>
<Value code="i"><description>Historical information</description></Value>
<Value code="k"><description>Ethnological information</description></Value>
<Value code="r"><description>Instructional materials</description></Value>
<Value code="s"><description>Music</description></Value>
<Value code="z"><description>Other</description></Value>
<Value code="|"><description>No attempt to code</description></Value>
</Position>
<Position pos="28"><name>Accompanying matter - code 5</name><description>Up to six one-character alphabetic codes (recorded in alphabetical order) that indicate the contents of program notes and other accompanying material for sound recording, music manuscripts, or notated music. If fewer than six codes are assigned, the codes are left justified and each unused position contains a blank (#).</description>
<Value code="#"><description>No accompanying matter</description></Value>
<Value code="a"><description>Discography</description></Value>
<Value code="b"><description>Bibliography</description></Value>
<Value code="c"><description>Thematic index</description></Value>
<Value code="d"><description>Libretto or text</description></Value>
<Value code="e"><description>Biography of composer or author</description></Value>
<Value code="f"><description>Biography of performer or history of ensemble</description></Value>
<Value code="g"><description>Technical and/or historical information on instruments</description></Value>
<Value code="h"><description>Technical information on music</description></Value>
<Value code="i"><description>Historical information</description></Value>
<Value code="k"><description>Ethnological information</description></Value>
<Value code="r"><description>Instructional materials</description></Value>
<Value code="s"><description>Music</description></Value>
<Value code="z"><description>Other</description></Value>
<Value code="|"><description>No attempt to code</description></Value>
</Position>
<Position pos="29"><name>Accompanying matter - code 6</name><description>Up to six one-character alphabetic codes (recorded in alphabetical order) that indicate the contents of program notes and other accompanying material for sound recording, music manuscripts, or notated music. If fewer than six codes are assigned, the codes are left justified and each unused position contains a blank (#).</description>
<Value code="#"><description>No accompanying matter</description></Value>
<Value code="a"><description>Discography</description></Value>
<Value code="b"><description>Bibliography</description></Value>
<Value code="c"><description>Thematic index</description></Value>
<Value code="d"><description>Libretto or text</description></Value>
<Value code="e"><description>Biography of composer or author</description></Value>
<Value code="f"><description>Biography of performer or history of ensemble</description></Value>
<Value code="g"><description>Technical and/or historical information on instruments</description></Value>
<Value code="h"><description>Technical information on music</description></Value>
<Value code="i"><description>Historical information</description></Value>
<Value code="k"><description>Ethnological information</description></Value>
<Value code="r"><description>Instructional materials</description></Value>
<Value code="s"><description>Music</description></Value>
<Value code="z"><description>Other</description></Value>
<Value code="|"><description>No attempt to code</description></Value>
</Position>
<Position pos="30"><name>Literary text for sound recordings - code 1</name><description>Up to two one-character codes (recorded in the order of the following list) that indicate the type of literary text contained in a nonmusical sound recording. If only one code is assigned, it is left justified and the unused position contains a blank (#).</description>
<Value code="#"><description>Item is a music sound recording</description></Value>
<Value code="a"><description>Autobiography</description></Value>
<Value code="b"><description>Biography</description></Value>
<Value code="c"><description>Conference proceedings</description></Value>
<Value code="d"><description>Drama</description></Value>
<Value code="e"><description>Essays</description></Value>
<Value code="f"><description>Fiction</description></Value>
<Value code="g"><description>Reporting</description></Value>
<Value code="h"><description>History</description></Value>
<Value code="i"><description>Instruction</description></Value>
<Value code="j"><description>Language instruction</description></Value>
<Value code="k"><description>Comedy</description></Value>
<Value code="l"><description>Lectures, speeches</description></Value>
<Value code="m"><description>Memoirs</description></Value>
<Value code="n"><description>Not applicable</description></Value>
<Value code="o"><description>Folktales</description></Value>
<Value code="p"><description>Poetry</description></Value>
<Value code="r"><description>Rehearsals</description></Value>
<Value code="s"><description>Sounds</description></Value>
<Value code="t"><description>Interviews</description></Value>
<Value code="z"><description>Other</description></Value>
<Value code="|"><description>No attempt to code</description></Value>
</Position>
<Position pos="31"><name>Literary text for sound recordings - code 2</name><description>Up to two one-character codes (recorded in the order of the following list) that indicate the type of literary text contained in a nonmusical sound recording. If only one code is assigned, it is left justified and the unused position contains a blank (#).</description>
<Value code="#"><description>Item is a music sound recording</description></Value>
<Value code="a"><description>Autobiography</description></Value>
<Value code="b"><description>Biography</description></Value>