[Koha-bugs] [Bug 29268] Query used in Koha::Biblio->get_marc_host is incorrect

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Oct 19 13:22:41 CEST 2021


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

--- Comment #1 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
(In reply to Martin Renvoize from comment #0)

Thx for digging :)

> First of all, both the 773 field and $w subfield are repeatable.. so we need
> to iterate for subfields as well as the field.

That would not be too hard. Rearrange in a loop:
        my $w = $f->subfield('w') or next;
        if( $w =~ /^\($orgcode\)\s*(\d+)/i or $w =~ /^\d+/ ) {

> Secondly, I don't think the search for (RCI)CN is correct.. this is what
> would appear in the 773 of the child, not how the 001 would be constructed
> in the host.

Not sure if you are right here.
There are two tries in the code:
$engine->simple_search_compat( 'Control-number='.$rcn, 0,1 );
We try with $rcn being a number only and $rcn including the orgcode too.

> It may also be helpful to add the `OR control-number=Controlnumber` search to 
> 1a to account for cases where OrgCode was added to new children but was is 
> missing from the host?

What you mean, is what the code already does?

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


More information about the Koha-bugs mailing list