Bug 39857: Fix expanded_avs option for OAI

This patch correct the call to filter the record

To test:
1 - Enable OAI
2 - Set  OAI-PMH:ConfFile to '/var/lib/koha/kohadev/OAI.yaml'
3 - Edit/create the file above to have content:
format:
  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
4 - save and restart_all
5 - View some records:
    http://localhost:8080/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marcxml
6 - Note the items show coded values
7 - Apply the regressions tests patch
8 - Run:
    $ ktd --shell
   k$ prove t/db_dependent/Koha/OAI/Server/Repository.t
=> FAIL: Tests fail!
9 - Apply this patch
10 - Restart all
11 - Refresh and confirm items now have descriptions
12 - Repeat 8
=> SUCCESS: Tests pass!

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit (tcohen): Amended the test plan to include the added regression
tests run
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Nick Clemens 2025-05-07 17:59:25 +00:00 committed by Katrin Fischer
parent 2e07046708
commit 6130a072d3
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 1 additions and 1 deletions

View File

@ -197,7 +197,7 @@ sub get_biblio_marcxml {
$record = $biblio->metadata_record(
{
embed_items => $with_items,
expand_coded_values => $expanded_avs,
expand_coded_fields => $expanded_avs,
interface => 'opac'
}
);