https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27507 --- Comment #16 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 211529 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211529&action=edit Bug 27507: Specify organization code when searching host record The "In:", "Set:", additional formats and related record links of the detail pages searched for the control number of the $w only, stripping the organization code, so two records with the same 001 and a different 003 could not be told apart and the link led to a list of results. Find the record in Koha::Biblio instead, using the same searches as get_marc_host (bug 29268): the 001 and the 003 of the (OrgCode)number, then the number alone. The detail scripts pass the biblionumber found for each linking field to the stylesheets, which link straight to the record. When no single record is found they search for the control number as before. This is done for the 770, 772, 773, 775, 776, 777, 780, 785 and 787 of the staff interface and OPAC detail pages, with a single template for the link, and only when UseControlNumber is enabled. The result lists do not find the records and keep searching for the number. To test: 1. Enable UseControlNumber and set MARCOrgCode to OSt 2. Add hosts: 001 123 + 003 OSt, 001 123 + 003 XYZ, 001 ocm555 without 003 3. Add a record with 773$w "(OSt)123", one with "(XYZ)123", one with "(OSt)ocm555" and one with "123" 4. In the staff interface and OPAC detail pages of these records, the "In:" link of the first three goes straight to the right host 5. The link of the record with "123" leads to a search with both hosts 6. Repeat with a 776 or 785 $w 7. prove t/db_dependent/XSLT.t t/db_dependent/Koha/Biblio/host_record.t -- You are receiving this mail because: You are watching all bug changes.