Main Koha release repository https://koha-community.org
Find a file
Tomas Cohen Arazi 6189f25dfa
Bug 23793: Add an EmbedItems RecordProcessor filter for MARC::Record objects
This patch introduces a RecordProcessor filter for MARC::Record objects
that embeds MARC::Field's for each item that is passed to the processor.

Target usage:

my $biblio = Koha::Biblios->find(
    $biblio_id,
    { prefetch => [ items, metadata ] }
);

my $opachiddenitems_rules;
eval {
    my $yaml = C4::Context->preference('OpacHiddenItems') . "\n\n";
    $opachiddenitems_rules = YAML::Load($yaml);
};

my @items  = grep { !$_->hidden_in_opac({ rules => $opachiddenitems_rules }) @{$biblio->items->as_list};
my $record = $biblio->metadata->record;

my $processor = Koha::RecordProcessor->new(
    {
        filters => ('EmbedItems'),
        options => {
            items        => \@items
        }
    }
);

$processor->process( $record );

Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-10-23 17:33:07 +01:00
acqui Bug 14669: Add search option for managing library to orders search 2019-10-08 14:04:48 +01:00
admin Bug 23772: Revert to passing itemtype objects to the template 2019-10-15 14:10:07 +01:00
api/v1 Bug 17005: Add plugin parameters to /checkouts endpoint 2019-10-08 14:33:39 +01:00
authorities Bug 19994: Used Modern::Perl in Authorities perl scripts 2019-01-28 14:58:23 +00:00
basket Bug 11529: Add templates for biblio title display. Unify display. 2019-08-05 15:03:19 +01:00
C4 Bug 22445: Custom cover images - opac results 2019-10-22 15:02:48 +01:00
catalogue Bug 22445: Custom cover images - detail (staff) 2019-10-22 15:02:50 +01:00
cataloguing Bug 15497: Limit itemtypes by branch in additem.pl 2019-09-12 16:31:06 +01:00
circ Bug 23551: Fix AddRenewal call in circ/renew.pl 2019-10-17 14:40:47 +01:00
clubs
course_reserves
debian Bug 23346: Add without-db-name parameter to koha-dump 2019-10-21 10:02:58 +01:00
docs Update docs/teams.yaml for 19.11.x development cycle 2019-10-22 15:15:33 +01:00
errors
etc Bug 13937: Fix the daemon log path. 2019-10-08 14:40:12 +01:00
ill
installer Bug 22445: DBRev 19.06.00.042 2019-10-22 15:05:56 +01:00
Koha Bug 23793: Add an EmbedItems RecordProcessor filter for MARC::Record objects 2019-10-23 17:33:07 +01:00
koha-tmpl Bug 22445: Replace %% with {} 2019-10-22 15:02:51 +01:00
labels
members Bug 17140: Make rounding syspref controlled 2019-10-11 10:52:44 +01:00
misc Bug 20434: Add default authority type 2019-10-17 15:02:47 +01:00
offline_circ
opac Bug 22445: Custom cover images - opac user (checkout list) 2019-10-22 15:02:50 +01:00
OpenILS
patron_lists
patroncards
plugins Bug 21073: (QA follow-up) Avoid unnecessary unless/else construct 2019-06-18 17:30:44 +01:00
reports Bug 23626: Only fetch full chart data if requested 2019-10-09 14:31:39 +01:00
reserve Bug 22922: Use jQuery datepicker instead of <input type="date"> 2019-10-21 10:01:01 +01:00
reviews
rotating_collections
serials Bug 23435: Add multiple copies of an item when receiving in serials 2019-10-17 14:59:40 +01:00
services
skel
suggestion
svc Bug 23390: Introduce placeholder syntax for report column names 2019-08-13 11:46:06 +01:00
t Bug 13937: (follow-up) Fix searching with UTF-8 characters. 2019-10-23 15:01:44 +01:00
tags Bug 11529: Add templates for biblio title display. Unify display. 2019-08-05 15:03:19 +01:00
tmp/modified_authorities
tools Bug 22996: Move barcode separators to a preference 2019-09-10 09:34:34 +01:00
virtualshelves Bug 11529: Add templates for biblio title display. Unify display. 2019-08-05 15:03:19 +01:00
xt
.editorconfig
.gitignore
.htaccess
.mailmap
.scss-lint.yml
about.pl Bug 14570: Add about.pl entry for wrong relationship data 2019-08-20 16:06:36 +01:00
changelanguage.pl
fix-perl-path.PL
gulpfile.js
help.pl
INSTALL
Koha.pm Bug 22445: DBRev 19.06.00.042 2019-10-22 15:05:56 +01:00
koha_perl_deps.pl
kohaversion.pl
LICENSE
mainpage.pl
Makefile.PL Bug 17851: Add elasticsearch config to koha-conf.xml 2019-10-07 14:09:10 +01:00
MANIFEST.SKIP
package.json
README
README.md
README.robots
rewrite-config.PL Bug 17851: Add elasticsearch config to koha-conf.xml 2019-10-07 14:09:10 +01:00
yarn.lock

Koha is a free software integrated library system (ILS).

Koha is distributed under the GNU GPL version 3 or later.

Note: This is a synced mirror of the official Koha repo.

Note: Koha does not accept pull requests from git hosting sites.

Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.

For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch

The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook

http://koha-community.org/

Koha Logo