[Bug 44064] New: Match linking $w on the (OrgCode)control number form when UseControlNumber is enabled
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44064 Bug ID: 44064 Summary: Match linking $w on the (OrgCode)control number form when UseControlNumber is enabled Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: MARC Bibliographic data support Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org Depends on: 21472, 27507, 29268, 35117, 39287 Blocks: 34482 Target Milestone: --- When UseControlNumber is enabled, Koha finds the component parts and volumes of a record by searching the $w of the linking fields for the record's 001 (and 003). This does not follow the MARC 21 definition of $w closely, and some links that look valid are not found. This bug is to agree and implement one way of matching that follows the specification. What the MARC 21 specification says - $w (Record control number) in 760-787 is the system control number of the related record, preceded by the MARC code of the agency in parentheses: (OrgCode)control number, for example (DLC)..., (OCoLC)..., (CaOONL)... - 003 is the MARC code of the organization whose control number is in 001, and the two must match. So the link to a host is "(" host 003 ")" host 001. - The specification does not say what a $w without the code means. - 773 links a component part (Leader/07 a, b or d) to its host. $w is also defined in 800, 810, 811 and 830 for series. What Koha does today (get_components_query and get_volumes_query in Koha::Biblio, searching the rcn and cni indexes) - Host without a 003: rcn:"001" - Host with a 003: (rcn:"001" AND cni:"003") OR rcn:"003 001" - cni is the 003 of the linked record itself, not of the host. Checked on a Zebra instance, with a host with 001 H1 and 003 0st, and linked records with Leader/07 a: 773 $w H1, own 003 0st: found 773 $w H1, no 003: NOT found 773 $w (0st)H1, no 003: found 773 $w (0st)H1, own 003 XYZ: found 773 $w H1, own 003 XYZ: not found So a bare control number is only matched when the linked record has the same 003 as the host. A bare $w on a record with no 003 is not found, although the Multipart Bibliographics wiki page says it links whether or not 003 is populated. Proposal 1. Match (003)001 first, as the specification defines it. 2. Decide and document what a bare $w means (same agency as the host, or a host without a 003), and whether MARCOrgCode should be assumed. 3. Handle the prefixes some agencies put on their 001 (for example ocm and ocn with OCoLC). 4. Consider the 035 control numbers of the host, as in bug 21472. 5. Use more specific indexes for hosts and series (bugs 39287 and 35330), so that a set's volumes do not include records linked from 776, 780 or 785. 6. Build the query in one place for get_components_query, get_volumes_query, get_marc_host and the XSLT links, as discussed on bug 27507, so the search and the display cannot drift apart. 7. Quote the values consistently in get_volumes_query. Related: 27507, 29268 and 21472 (matching and organization codes), 35117 and 41713 (records without a 001), 39287, 35330 and 38252 (indexes), 34482 (omnibus). Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21472 [Bug 21472] Allow linking of $w subfields to 035 or 001+003 using the MarcOrgCode prefix https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27507 [Bug 27507] Search host record using control number identifier / organization code https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29268 [Bug 29268] Query used in Koha::Biblio->get_marc_host is incorrect https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34482 [Bug 34482] Improve MARC21 7xx linking fields in bibliographic records [Omnibus] https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35117 [Bug 35117] get_marc_components and get_marc_volumes should be more consistent https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39287 [Bug 39287] Improve "Show volume" search with a more specialized search index -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44064 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=41713, | |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=35330, | |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=38252, | |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=13529, | |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=31608 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44064 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Hi Katrin, Marcel and all, A lot has happened since I filed this, so here is where it stands and what I would like to do next. The indexes are no longer part of this bug. Point 5 of the description is done or attached: rcn-volumes (bug 39287), the missing fields in rcn (38252), rcn-components (35330) and Show volumes for serials (42027), plus bug 35117 (a record without a 001) and bug 44063 (the component sort). What is left here is how a host is matched to the records that link to it: get_components_query, get_volumes_query and the links that the stylesheets build. 1. Match the (003)001 form that the specification defines. 2. Decide what a $w without an organization code means, and whether the MARCOrgCode should be assumed. 3. Handle the prefixes some agencies put on their 001 (for example ocm and ocn with OCoLC). 4. Consider the 035 numbers of the host (bug 21472). Records imported from another system often have their original 001 moved to the 035 (for example an (OCoLC) number), while the $w of the linked records still uses that number. Only the 001 and 003 of the host are used today, so those links are not found. 5. Build the query in one place. The Analytics and Show volumes links of the staff interface and OPAC are built in the stylesheets from the 001 only, so they ignore the 003 and can give a different result from the Components tab. 6. Quote the values in get_volumes_query like get_components_query does. I would like to keep the other direction, finding the host of a record from its $w (get_marc_host and the Set and In links, bugs 27507, 29268 and 21472), apart from this bug. They have not moved for a long time and should not hold this one up, so I am removing them as dependencies here and leaving them as see also. A question for Katrin and Marcel, as this is the part the specification does not answer. With a host that has a 001 and a 003, a linked record with a bare $w (no organization code) is only found today if its own 003 is the same as the host's. With a bare $w and no 003 it is not found. I checked this on Zebra, although the Multipart Bibliographics wiki page says it is found. What should happen? a) Keep it as it is: a bare number only matches records of the same agency. b) Also match a bare number on records without a 003, assuming the same agency. This is what the wiki page describes, but it can match the wrong record if the numbers of two agencies collide. c) Only match the (003)001 form, as the specification defines it. I have no strong preference, so I would like your views. In the meantime I will start on 5 and 6, which do not depend on the answer. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44064 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|21472, 27507, 29268 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21472 [Bug 21472] Allow linking of $w subfields to 035 or 001+003 using the MarcOrgCode prefix https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27507 [Bug 27507] Search host record using control number identifier / organization code https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29268 [Bug 29268] Query used in Koha::Biblio->get_marc_host is incorrect -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44064 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=27507, | |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=29268, | |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=21472 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44064 --- Comment #2 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 211524 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211524&action=edit Bug 44064: Quote the values in get_volumes_query get_components_query quotes the control numbers it searches for, but get_volumes_query did not, so a 001 or 003 containing spaces or search syntax characters would be parsed as several terms. Quote them the same way, so both queries treat the control numbers as a single value. To test: 1. prove t/db_dependent/Koha/Biblio.t -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44064 --- Comment #4 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Patches attached for points 5 and 6 above, which do not depend on the bare $w question. 1. get_volumes_query now quotes the 001 and 003 values, like get_components_query does. 2. The Analytics and Volumes links of the staff interface and OPAC detail pages no longer build their own search in the stylesheet. The detail scripts pass in the query from Koha::Biblio, so the links use the same query as the Components tab and the volumes check, including the 003 and the title fallback. These apply on top of bugs 35117, 39287, 35330, 42027 and 44063, as they change the same methods and stylesheet lines. I tested them on Elasticsearch with a host that has a 001 and a 003, one volume and one component: both links find just those records. I have not tested Zebra. The decision on a bare $w (a, b or c above) is still open. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44064 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@openfifth.c |ity.org |o.uk -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44064 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org