Bug 26195

Summary: Add a way to specify authorised values should be expanded [OAI]
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: Web servicesAssignee: Tomás Cohen Arazi <tomascohen>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: agustinmoyano, dcook, fridolin.somers, jonathan.druart, kyle, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
This enhancement adds a new option to the OAI configuration file, to tell it to expand authorised values.
Version(s) released in:
21.11.00,21.05.04
Attachments: Bug 26195: - Add a way to specify authorised values should be expanded [OAI]
Bug 26195: Add a way to specify authorised values should be expanded [OAI]
Bug 26195: Add a way to specify authorised values should be expanded [OAI]
Bug 26195: Add a way to specify authorised values should be expanded [OAI]

Description Tomás Cohen Arazi 2020-08-12 14:56:37 UTC
It is not uncommon to prefer descriptions to codes when exposing the library data through OAI.

I propose we add a configuration option (off by default) that allows such a thing.
Comment 1 Tomás Cohen Arazi 2020-08-13 17:57:44 UTC Comment hidden (obsolete)
Comment 2 David Cook 2020-08-14 01:31:53 UTC
Sounds interesting. I'll add it to my list!
Comment 3 Tomás Cohen Arazi 2020-08-18 20:08:52 UTC
Created attachment 108550 [details] [review]
Bug 26195: Add a way to specify authorised values should be expanded [OAI]

This patch introduces a new configuration entry for OAI so the resulting
records include authorised value descriptions instead of codes.

This is off by default.

To test:
1. Create a yaml file with the extended OAI configuration
2. Visit http://kohadev.myDNSname.org:8080/cgi-bin/koha/oai.pl
3. Browse some records
=> SUCCESS: The fields tied to AV show codes.
4. Update your configuration with 'expanded_avs: 1' for one  of the
   defined format like in:

  ---
  format:
    marc21:
      metadataPrefix: marc21
      metadataNamespace: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim
      schema: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd
      include_items: 0
    marcxml:
      metadataPrefix: marcxml
      metadataNamespace: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim
      schema: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd
      include_items: 1
      expanded_avs: 1
5. restart_all
6. Repead 3
=> SUCCESS: AV descriptions are returned!
7. Sign off :-D
Comment 4 Nick Clemens 2021-04-15 13:50:17 UTC
Created attachment 119628 [details] [review]
Bug 26195: Add a way to specify authorised values should be expanded [OAI]

This patch introduces a new configuration entry for OAI so the resulting
records include authorised value descriptions instead of codes.

This is off by default.

To test:
1. Create a yaml file with the extended OAI configuration
2. Visit http://kohadev.myDNSname.org:8080/cgi-bin/koha/oai.pl
3. Browse some records
=> SUCCESS: The fields tied to AV show codes.
4. Update your configuration with 'expanded_avs: 1' for one  of the
   defined format like in:

  ---
  format:
    marc21:
      metadataPrefix: marc21
      metadataNamespace: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim
      schema: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd
      include_items: 0
    marcxml:
      metadataPrefix: marcxml
      metadataNamespace: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim
      schema: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd
      include_items: 1
      expanded_avs: 1
5. restart_all
6. Repead 3
=> SUCCESS: AV descriptions are returned!
7. Sign off :-D

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 5 Kyle M Hall 2021-05-28 18:38:40 UTC
Created attachment 121495 [details] [review]
Bug 26195: Add a way to specify authorised values should be expanded [OAI]

This patch introduces a new configuration entry for OAI so the resulting
records include authorised value descriptions instead of codes.

This is off by default.

To test:
1. Create a yaml file with the extended OAI configuration
2. Visit http://kohadev.myDNSname.org:8080/cgi-bin/koha/oai.pl
3. Browse some records
=> SUCCESS: The fields tied to AV show codes.
4. Update your configuration with 'expanded_avs: 1' for one  of the
   defined format like in:

  ---
  format:
    marc21:
      metadataPrefix: marc21
      metadataNamespace: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim
      schema: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd
      include_items: 0
    marcxml:
      metadataPrefix: marcxml
      metadataNamespace: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim
      schema: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd
      include_items: 1
      expanded_avs: 1
5. restart_all
6. Repead 3
=> SUCCESS: AV descriptions are returned!
7. Sign off :-D

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 6 Jonathan Druart 2021-08-31 08:11:53 UTC Comment hidden (obsolete)
Comment 7 Jonathan Druart 2021-08-31 08:28:23 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 8 Kyle M Hall 2021-09-03 15:18:27 UTC
Pushed to 21.05.x for 21.05.04 by request.
Comment 9 Fridolin Somers 2021-09-08 20:48:34 UTC
Enhancement not pushed to 20.11.x