Bug 40309

Summary: New authority framework plugin for MARC21 (marc21_field_082a_authorities.pl)
Product: Koha Reporter: Andreas Roussos <a.roussos>
Component: MARC Authority data supportAssignee: Andreas Roussos <a.roussos>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Medium patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 40308    
Bug Blocks:    
Attachments: Bug 40309: add new Authority Framework plugin for MARC21 082$a

Description Andreas Roussos 2025-07-06 21:02:17 UTC
Background information
----------------------
Dewey Decimal Classification (DDC) [1] numbers can be stored in MARC21
authority records as follows ('R' and 'NR' denoting 'Repeatable' and
'Non-Repeatable' fields/subfields, respectively):

082 - Dewey Decimal Call Number (R)
082$a - Classification number (NR)

083 - Dewey Decimal Classification Number (R)
083$a - Classification number element-single number or beginning number of span (NR)
083$b - Classification number element-ending number of span (NR)

Since 2024, both MARC21 and UNIMARC standards have been updated to enable
storing information in the form of Real World Object URIs, corresponding
to either a single DDC number or a DDC number range. Such URIs are stored
in MARC21 subfield 082$1 / 083$1. Here's an example provided by LoC:

082 0 4 $a 205
        $2 23/eng/20230428
        $1 https://id.oclc.org/worldcat/ddc/E3wr6cb9BxbG4wDPXgHCPXYfYw

For more information, please refer to the LoC website [2,3]:

The OCLC Dewey Linked Data API
------------------------------
OCLC recently [4] started offering a Linked Data (LD) [5] API [6] that
allows looking up DDC numbers to obtain unique URIs/URLs and Descriptions
for a particular DDC number (or range). In addition to API searches, a
smaller subset of the LD can also be browsed online in a hierarchical
manner [7].

Reasoning behind this Bug report
--------------------------------
We believe that Koha users who include DDC numbers in their authority
cataloguing would benefit from an integration with the OCLC Dewey LD API
that would allow them to easily lookup DDCs in exchange for LD URIs/URLs
and Descriptions.

To this end, we propose the addition of a new Authority Framework plugin
for MARC21 that will offer this functionality. This plugin builds on the
groundwork laid by Bug 40308, in order to offer 1-click DDC lookups from within
the Authorities cataloguing editor.

References:
[1] https://www.oclc.org/content/dam/oclc/dewey/versions/print/intro.pdf
[2] https://www.loc.gov/marc/authority/ad082.html
[3] https://www.loc.gov/marc/authority/ad083.html
[4] https://www.oclc.org/en/news/releases/2024/20240815-uniform-resource-identifiers-for-ddc-numbers.html
[5] https://www.oclc.org/en/linked-data.html
[6] https://developer.api.oclc.org/dewey-ld
[7] https://entities.oclc.org/worldcat/ddc/
Comment 1 Andreas Roussos 2025-07-07 00:18:52 UTC
Created attachment 183814 [details] [review]
Bug 40309: add new Authority Framework plugin for MARC21 082$a

This Authority Framework plugin should be attached to MARC21 authority
subfield 082$a, which will then allow the cataloguer to lookup a single
DDC in exchange for a Dewey Linked Data URL that will be copied to
subfield 082$1.

Test plan:

1) Go to Administration > Authority types, and for each authtype
   associate subfield 082$a with the marc21_field_082a_authorities.pl
   plugin.

2) Create a new authority, or edit an existing one. Click on the
   'Tag editor' button on the far right of the 082$a subfield.
   Experiment with the behaviour of the plugin when no DDC has
   been filled in, or when an erroneous DDC has been filled in.
   Monitor your browser's JavaScript console for warnings/errors
   (there shouldn't be any!).

3) Experiment with changing the values of the related System
   Preferences (found under the 'OCLC Dewey Linked Data API'
   heading) and seeing how it affects the behaviour of the
   plugin.