If you have an authority, with more than one heading, for example a UNIMARC multilingual author: 200 $7 da $a 原 $b 純輔 200 $7 ba $a Hara $b Junsuke In data entry form, you click on ..., you find such an authority, you click on Choose. The result is messed up. $9 is not copied and $7 content modify $9 code into $ba.
http://lists.koha-community.org/pipermail/koha-patches/2010-May/011992.html http://lists.koha-community.org/pipermail/koha-patches/2010-May/011993.html
I rebased this patch on HEAD: http://lists.koha-community.org/pipermail/koha-patches/2010-December/013223.html I need it. It doesn't hurt anything. It's not easy to test because multilingual authorities are required. So I will post a screencast to show how it works.
Screencast of bug-solution: http://www.youtube.com/watch?v=Ta50zLWdRSw
Pushed to new/bug_4838, please test with both MARC21 and UNIMARC then let me know and I will merge it.
This bug is mentioned in: Bug 4838 Allow to choose which authority heading to copy into biblio record http://lists.koha-community.org/pipermail/koha-patches/2010-December/013439.html
Have tested with MARC21 seems ok, merging please test and mark resolved
This patch, beside that it adds some enhancements, introduces also problems with UNIMARC authorities, if summary is defined for UNIMARC authorities according to the standard settings from installation files (e.g. autorites_norme_unimarc.sql) Try this (having authorities summaries defined in the standard form, cf. autorites_norme_unimarc.sql or screenshot and subsequent subfields in authority records defined as well): 1. Go: Cataloguing --> New Record 2. Go to a field controlled by authority, of which you know that has has "--" in summary and subfields preceded by "--" defined, e.g. SNC in standard UNICODE situation with x, y or z subfields 3. Click on ... 4. Search for such a term which has x, y or z defined (and a of course) 5. Try to click on 2 next to search result You should get en error (cf. screenshot). This is because of the following: In the patch 4838 a notion of "repet" is introduced. In line 77 of auth_finder.pl "--" is used to extract (in fact: guess) the subsequent repets from summary (produced by C4::BuildSummary). BUT if there is only one heading field in the authority record and by chance this field contains subfields, which--according to the summary template--will be separated by two dashes, then "repets" will be created (whereas should not) and by clicking on 2 you get in troubles in blinddetail-biblio-search.pl, when executing: my $field = $fields[$repet]; for ( $field->subfields ) { In described scenario, $field is not defined (@fields has only one element), hence you get error. What can be done? My ideas about it: Either one should modify the patch in a way that it will guess "repets" correctly OR change the default summary templates in autorites_norme_unimarc.sql AND (warn people using UNIMARC to modify their existing summaries templates OR make the modification for them in updatedatabase.pl). BTW changing the template to something like "[250a][ - 250x][ - 250y][ - 250z] [(250b)]" (one dash instead of two) helps, of course.
Created attachment 4367 [details] A screenshot illustrating the problem with repets with no real repets
> BTW changing the template to something like "[250a][ - 250x][ - 250y][ - 250z] > [(250b)]" (one dash instead of two) helps, of course. I confirm the bug, the diagnostic and the above solution (that I prefer to others...). Would you mind sending a patch replacing '--' with '-'?
In 3.8, this functionality doesn't work anymore. Recent work on authorities broke the template which was distinguishing authorities repetitions.
Created attachment 9919 [details] [review] Proposed patch for 3.8 (and HEAD) How to test: Create an authority, with more than one heading, for example a UNIMARC multilingual author: 200 $7 da $a 原 $b 純輔 200 $7 ba $a Hara $b Junsuke In data entry form, on 700 field, you click on ... Search for the above author. In auhtority search result page, you just have a 'Choose' link, and so you just can select the first heading (in Chinesse writing). Apply the patch. Repeat. Now you have, on result page, you have two links, and can select one heading or the other.
I tested this patch with Frederic indications and it works fine. I tested both links, everything was ok.
Created attachment 10066 [details] [review] [SIGNED-OFF] Bug 4838 Fix repeated authorities selection How to test: Create an authority, with more than one heading, for example a UNIMARC multilingual author: 200 $7 da $a 原 $b 純輔 200 $7 ba $a Hara $b Junsuke In data entry form, on 700 field, you click on ... Search for the above author. In auhtority search result page, you just have a 'Choose' link, and so you just can select the first heading (in Chinesse writing). Apply the patch. Repeat. Now you have, on result page, you have two links, and can select one heading or the other. Signed-off-by: François Charbonnier <francois.charbonnier@biblibre.com>
QA comment: template only changes that switches from a single display to a loop in case a value is repeated. passed QA
Lowering severity as the case is quite rare, but it's a bugfix, so valuable in 3.8
Pushed to 3.8.x will be in 3.8.2