Bug 30848: Add an ExpandCodedFields RecordProcessor filter
This patch introduces a RecordProcessor filter for MARC::Record objects
that replaces Koha codes with descriptions in the MARC::Record passed to the processor.
Target usage:
my $biblio = Koha::Biblios->find(
$biblio_id,
{ prefetch => [ metadata ] }
);
my $record = $biblio->metadata->record;
my $processor = Koha::RecordProcessor->new(
{
filters => ('ExpandCodedFields'),
options => {
interface => 'opac',
frameworkcode => $biblio->frameworkcode
}
}
);
$processor->process( $record );
Test plan
* Read the included unit test and confirm it makes sense and passes
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit
62bba6d9e12bdf9e3dbf231beae68afe43618f4b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit
0a861042947adbc12b4d865c89c6a87effe965b9)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>