Bug 11650: multiplicated authorities after link_bibs_to_authorities.pl
authorJanusz Kaczmarek <januszop@gmail.com>
Fri, 31 Jan 2014 14:09:07 +0000 (15:09 +0100)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 7 Jul 2014 15:40:25 +0000 (12:40 -0300)
commit4458ac5764126049d95e115adeacd1f335efdb8f
tree4f6f104e012afce4b98e54e662dd8fd9c98af549
parent5d6c092921919526ade501facb1220f8a108a08f
Bug 11650: multiplicated authorities after link_bibs_to_authorities.pl

Under certain circumstances misc/link_bibs_to_authorities.pl creates
multiple authority with identical heading.

Test plan:
1. Have some (2-3) biblio records with some repeated headings
   Have BiblioAddsAuthorities = allow, AutoCreateAuthorities = generate
   Have no authority records
2. Run misc/link_bibs_to_authorities.pl script
3. You will get multiple authority records -- one for each occurence of a
   heading in biblio record.

4. Apply the patch.
5. Repeat 1-3 (remember to have "fresh" biblios, without $9, and no
   authorities).
6. The problem should be fixed.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as described.
C4/Biblio.pm
C4/Linker.pm
C4/Linker/Default.pm
C4/Linker/FirstMatch.pm
C4/Linker/LastMatch.pm