I have in a database authorities (marcxml.auth_header) $9<space>0<space> in the tag 2XX So when I want link a bib record with a auth record, koha create the link with the $9<space>0<space> in the tag 2XX and not with the authid from auth_header. Result in the thesaurus all the link are bad
Created attachment 9513 [details] [review] patch proposed This is a quick fix. and fixes the erroneous data. What could be done, though it would add some access to database would be to check the presence of the authority before sending the authid to detail pages.
Hi, this is marked as blocker, but I am not sure how to test it. Can you perhaps provide a test plan?
Created attachment 11134 [details] [review] Proposed patch (2) I propose a patch with in addition to first patch the behavior : when a thesaurus is applied to a field, first set fields values from authority and then set $9 field with authid. (see js in blinddetail-biblio-search.tt).
Test plan : ----------- Test thesaurus in cataloging : Edit an authority type to allow $9 edition in the field that will be copied into biblio. Create a new authority of this type using and set '0' in the subfield $9 defined above. Save the authority. Wait for incremental indexing (or perform rebuild_zebra.pl -a -z). Create a new record. Edit a field using as thesaurus the above authority type. Click on thesaurus link (usually at $a). Search for the authority created above. Choose it. Without patch => $9 in biblio field will have '0'. With patch => $9 in biblio field will have the authid number. + Test authority with $9='0' in MARC view. + Test authorities merge.
Created attachment 11157 [details] [review] Proposed patch (3) Patch revision : After a discussion, we agreed that the special behavior for $9=' 0 ' is too specific to be pushed into community version. Still the presence of $9 in authority should not break the thesaurus in cataloging nor the merge, that is what is still in the patch. I added some comments to specify why $9 is special. In Biblio.pm : I corrected GetMarcSeries, it was using MARC21 fields even in a UNIMARC config. In GetMarcSubjects, GetMarcAuthors and GetMarcSeries, I modified them so that the $9 subfield is selected before looping on other subfields. Without that, the @link_loop was correctly set only if $9 is first subfield. Also, I tried to unify there code, like using $record->field('X..') to avoid looping on all fields.
Remove "Test authority with $9='0' in MARC view" form test plan.
Created attachment 11554 [details] [review] Bug 8071: link between bib and authorities with the authid Do not automatically populate $9 in bibliographic headings when the $9 is set in the authorized heading field of the authority record. Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
patch looks good, applied to MASTER, passing QA... $ koha-qa.pl testing 1 commit(s) (applied to commit 60790d0) * 955eee1 Bug 8071: link between bib and authorities with the authid C4/AuthoritiesMarc.pm C4/Biblio.pm authorities/blinddetail-biblio-search.pl koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt * C4/AuthoritiesMarc.pm OK * C4/Biblio.pm OK * authorities/blinddetail-biblio-search.pl OK * koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-seOK
Patch pushed to master
Pushed to 3.8.x will be in 3.8.5. Template change but no string changes. But being a blocker I would push anyway. (Blockers trump freezes at least in my book)