Bug 39418

Summary: RDA Carrier, Content, & Media Vocabularies
Product: Koha Reporter: Eric Phetteplace <ephetteplace>
Component: CatalogingAssignee: Eric Phetteplace <ephetteplace>
Status: Failed QA --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: david, flyingendpaper, m.de.rooy, mathsabypro, mnero, nick
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: Sponsored
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 39418: RDA Carrier, Content, & Media Vocabularies
Bug 39418: RDA Carrier, Content, & Media Vocabularies
Bug 39418: RDA Carrier, Content, & Media Vocabularies db

Description Eric Phetteplace 2025-03-21 19:12:41 UTC
On our Koha, we've loaded the RDA vocabularies for MARC 336 Content, 337 Media, and 338 Carrier into our authorized values in order to connect them with the $a and $b subfields of those fields in our MARC frameworks. This bug would preload these vocabularies for new instances of Koha.

There are two AV categories per field, one for the human-readable term ($a) and one for a short code ($b). I made the lib/lib_opac text for the codes the term they represent, so one does not have to memorize the meanings of the codes.

I do not see any instance of an authorized value being connected with a MARC field during installation (looking in installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.yml where all the authorised_value properties are empty) so I have not done so with these either. That seems reasonable; some libraries may want to use different terms. But the RDA vocabs are widely used and stable, so including them as an option for catalogers is worthwhile.

To load these into an existing Koha instance, this is the SQL we used: https://github.com/phette23/scrape_rda_vocabs/blob/main/koha.sql
Comment 1 Eric Phetteplace 2025-03-21 19:17:52 UTC
Created attachment 179630 [details] [review]
Bug 39418: RDA Carrier, Content, & Media Vocabularies

Test plan:
----------
1. Create a fresh Koha instance
2. Navigate to admin > authorized values
3. Note there are no RDA value categories
4. Apply the patch and recreate a new Koha
5. Repeat step 2
6. There are six RDA value categories: RDACARRIER, RDACARRIER_CODE,
RDACONTENT, RDACONTENT_CODE, RDAMEDIA, and RDAMEDIA_CODE

Sponsosred-by: California College of the Arts
Comment 2 Eric Phetteplace 2025-03-21 19:19:25 UTC
Oh I meant to add links to the vocabularies from the Library of Congress (but these are also in the AV category descriptions I added):

https://www.loc.gov/standards/valuelist/rdacarrier.html
https://www.loc.gov/standards/valuelist/rdacontent.html
https://www.loc.gov/standards/valuelist/rdamedia.html
Comment 3 Mathieu Saby 2025-03-22 15:40:29 UTC Comment hidden (obsolete)
Comment 4 Mathieu Saby 2025-03-22 15:43:41 UTC
Not a duplicate of https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32488 , but dealing with the same fields. I wanted to add Elasticsearch and Zebra indexes for them. Maybe I was wrong. Do these fields already have indexes?
Comment 5 Eric Phetteplace 2025-03-24 19:31:34 UTC
If you are using Elasticsearch, you can see exactly which fields are indexed and how by going to Admin > "Search engine configuration (Elasticsearch)" (your.domain/cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl). Look at the Bibliographic Records tab in the Mapping column for the MARC references.

You are correct, it looks as if these fields are not indexed (or at least, they're not for us). There is a title-medium index for 245$h which might be repurposable for the RDA fields. There's also material-type for 007.

(In reply to Mathieu Saby from comment #4)
> Not a duplicate of
> https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32488 , but
> dealing with the same fields. I wanted to add Elasticsearch and Zebra
> indexes for them. Maybe I was wrong. Do these fields already have indexes?
Comment 6 David Nind 2025-03-28 10:49:54 UTC
Created attachment 179832 [details] [review]
Bug 39418: RDA Carrier, Content, & Media Vocabularies

Test plan:
----------
1. Create a fresh Koha instance
2. Navigate to admin > authorized values
3. Note there are no RDA value categories
4. Apply the patch and recreate a new Koha
5. Repeat step 2
6. There are six RDA value categories: RDACARRIER, RDACARRIER_CODE,
RDACONTENT, RDACONTENT_CODE, RDAMEDIA, and RDAMEDIA_CODE

Sponsosred-by: California College of the Arts
Signed-off-by: David Nind <david@davidnind.com>
Comment 7 Nick Clemens (kidclamp) 2025-05-29 11:23:26 UTC
Hi Eric,

This looks good but we should also handle the case for existing installs and add an atomic update to add the values.

https://wiki.koha-community.org/wiki/Database_updates

Let me know if you need any help.

-Nick
Comment 8 Eric Phetteplace 2025-06-06 19:00:09 UTC
Created attachment 183079 [details] [review]
Bug 39418: RDA Carrier, Content, & Media Vocabularies db

This contains a database update script so that existing Koha instances
also receive authorised values for the RDA vocabularies from bug 39418

Sponsored-by: California College of the Arts
Comment 9 David Nind 2025-06-15 23:25:54 UTC
Just checking if this is ready to go back into either the needs signoff or needs QA queues? The status is still "Failed QA".
Comment 10 Eric Phetteplace 2025-06-16 15:53:21 UTC
I'd missed that the status was Failed QA and I'm not sure myself. If we want to do QA again, I can elaborate the testing steps needed for existing Koha instances (basically the same, check that the vocabs are created after updating the db).