Bug 11650 - multiplicated authorities after link_bibs_to_authorities.pl
Summary: multiplicated authorities after link_bibs_to_authorities.pl
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Authority data support (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Janusz Kaczmarek
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-31 14:27 UTC by Janusz Kaczmarek
Modified: 2015-06-04 23:33 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
proposed patch (3.77 KB, patch)
2014-01-31 14:34 UTC, Janusz Kaczmarek
Details | Diff | Splinter Review
Bug 11650: multiplicated authorities after link_bibs_to_authorities.pl (3.80 KB, patch)
2014-06-19 09:32 UTC, Chris Cormack
Details | Diff | Splinter Review
[PASSED QA] Bug 11650: multiplicated authorities after link_bibs_to_authorities.pl (3.89 KB, patch)
2014-06-20 16:25 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Janusz Kaczmarek 2014-01-31 14:27:32 UTC
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.
Comment 1 Janusz Kaczmarek 2014-01-31 14:34:41 UTC Comment hidden (obsolete)
Comment 2 Janusz Kaczmarek 2014-01-31 14:39:20 UTC
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...?
Comment 3 Chris Cormack 2014-06-19 09:32:57 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall 2014-06-20 16:25:44 UTC
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>
Comment 5 Tomás Cohen Arazi 2014-07-07 15:46:24 UTC
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)