[Koha-bugs] [Bug 21272] MARC import should warn about mis-matched branch and item-type fields in 952 during staged import

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Oct 27 12:53:55 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21272

--- Comment #9 from Kyle M Hall <kyle at bywatersolutions.com> ---
Comment on attachment 155523
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155523
Bug 21272: MARC import should warn about mis-matched branch and item-type
fields in 952 during staged import

Review of attachment 155523:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=21272&attachment=155523)
-----------------------------------------------------------------

::: C4/ImportBatch.pm
@@ +819,5 @@
> +            my ( $holdingbranchfield, $holdingbranchsubfield ) = GetMarcFromKohaField('items.holdingbranch');
> +            my $holdingbranch = $item_marc->subfield( $holdingbranchfield, $holdingbranchsubfield );
> +
> +            my @branches = map { $_->branchcode } Koha::Libraries->search->as_list;
> +            my %branches = map { $_ => 1 } @branches;

why not use https://perldoc.perl.org/List::Util#any and get rid of %branches

@@ +1235,5 @@
> +        WHERE import_batch_id = ?
> +        ORDER BY import_items_id";
> +    my @params;
> +    push( @params, $batch_id );
> +    my $sth = $dbh->prepare_cached($query);

Should this be a cached querey?

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list