[koha-commits] main Koha release repository branch master updated. v19.05.00-1005-g99a1a6d

Git repo owner gitmaster at git.koha-community.org
Wed Oct 23 18:56:15 CEST 2019


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "main Koha release repository".

The branch, master has been updated
       via  99a1a6db0f720cf0896a5ea2651cce89e35384ae (commit)
       via  6189f25dfae19f99800168db7be996e1239efae3 (commit)
      from  2b149c3d7aa7e2f59fcee6d8778f8e0c685cc406 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 99a1a6db0f720cf0896a5ea2651cce89e35384ae
Author: Tomas Cohen Arazi <tomascohen at theke.io>
Date:   Mon Oct 14 09:05:46 2019 -0300

    Bug 23793: Unit tests
    
    This patch introduces full test coverage for the EmbedItems filter.
    
    To test:
    1. Apply this patchset
    2. Run:
       $ kshell
      k$ prove t/db_dependent/Koha/Filter/EmbedItems.t
    => SUCCESS: Tests pass!
    3. Sign off :-D
    4. Use it to improve Koha!
    
    Signed-off-by: Ere Maijala <ere.maijala at helsinki.fi>
    Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

commit 6189f25dfae19f99800168db7be996e1239efae3
Author: Tomas Cohen Arazi <tomascohen at theke.io>
Date:   Thu Oct 10 13:17:18 2019 -0300

    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 at helsinki.fi>
    Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

-----------------------------------------------------------------------

Summary of changes:
 Koha/Filter/MARC/EmbedItems.pm          |   91 +++++++++++++++++++++++++++++++
 t/db_dependent/Koha/Filter/EmbedItems.t |   72 ++++++++++++++++++++++++
 2 files changed, 163 insertions(+)
 create mode 100644 Koha/Filter/MARC/EmbedItems.pm
 create mode 100755 t/db_dependent/Koha/Filter/EmbedItems.t


hooks/post-receive
-- 
main Koha release repository


More information about the koha-commits mailing list