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.