[Koha-bugs] [Bug 29268] New: 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 12:52:56 CEST 2021


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

            Bug ID: 29268
           Summary: Query used in Koha::Biblio->get_marc_host is incorrect
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: martin.renvoize at ptfs-europe.com
        QA Contact: testopia at bugs.koha-community.org

After digging through this some more in relation to bug 27507 and bug 11175 I
have come to the conclusion that I think the searches performed by
get_marc_host are too simplistic/incorrect.

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

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.

What I believe we really need to do is as follows:

1. Iterate through 773 fields.
2. Iterate through subfield w's and looks for one of the following:
1a. (RCI)Controlnumber where the RCI matches the OrgCode syspref
1b. Fully numeric Controlnumber
3. Once we've found the form we're expecting from above iterations (1a in
preference to 1b if both exist) jump out of the loops.
3. Produce the search string 'control-number=Controlnumber' for 1b. or
`control-number=Controlnumber AND rci=RCI` if 1a is found.  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?

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


More information about the Koha-bugs mailing list