Under certain circumstances misc/link_bibs_to_authorities.pl creates multiple authority with identical heading. Test scenario: 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.
Created attachment 24947 [details] [review] proposed patch 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.
Jared, I am no sure if you will like this patch (it is related to your Bug 7284 solution). Perhaps you would have a more elegant idea to sort this out...?
Created attachment 28982 [details] [review] 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>
Created attachment 29115 [details] [review] [PASSED QA] 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>
Patch pushed to master. Thanks Janusz! Note: we need unit tests for this kind of patches. The change looks simple and easy to spot. I pushed it because it was simple, and noticed we don't have the glue to write tests for this in t/db_dependent/Biblio.t (yet :-D)