Summary: | bulkmarcimport.pl inserts authority duplicates | ||
---|---|---|---|
Product: | Koha | Reporter: | Matthias Meusburger <matthias.meusburger> |
Component: | Command-line Utilities | Assignee: | Matthias Meusburger <matthias.meusburger> |
Status: | Pushed to oldoldstable --- | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | normal | ||
Priority: | P5 - low | CC: | david, fridolin.somers, koha, koha, lucas, marjorie.barry-vila, martin.renvoize, robin |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This fixes the misc/migration_tools/bulkmarcimport.pl script when importing authority records so that the "--match" option works as expected, and no duplicates are created. Previously, this option was not working for authority records and duplicate records were being created even when there was a match.
|
Version(s) released in: |
24.11.00,24.05.06,23.11.11
|
Circulation function: | |||
Attachments: |
Bug 18273: Do not insert authority if there already are duplicates in koha
Bug 18273: Do not insert authority if there already are duplicates in koha Bug 18273: Do not insert authority if there already are duplicates in koha Bug 18273: Do not insert authority if there already are duplicates in koha |
Description
Matthias Meusburger
2017-03-15 15:30:40 UTC
Created attachment 61106 [details] [review] Bug 18273: Do not insert authority if there already are duplicates in koha The bibliographic import overlays the one with the lower (or higher?) biblionumber. Not sure if we should make it consistent. Are you sure about that Katrin? From what I've seen, the behaviour is the same for biblios: if multiple matching biblios have been found, a new biblio is inserted. Hm, I was pretty sure, but was thinking of the staged marc tool. Didn't realize then it will probably be different for bulkmarcimport. Makes sense then. Need signoff ? Needs an easy rebase Hi, it would be nice to have a follow-up on this one. Thx Sonia Created attachment 144213 [details] [review] Bug 18273: Do not insert authority if there already are duplicates in koha I think I managed to successfully rebase this one, but I'm not sure how to test. If we could get a test plan, I'll have a go at testing. It would be great if the test plan could include: - the bulkmarcimport command to use, and - authority record samples to use to test the scenarios outlined in the bug description (or how to create). Patch still applies, but is missing a test plan. I think some hints, especially on the CLI parameters to use with bulkmarcimport could help to get this further. Created attachment 171385 [details] [review] Bug 18273: Do not insert authority if there already are duplicates in koha Test plan: 1) Create an authority with a unique value in a searchable field, for instance a PERSO_NAME authority with 'BZ18273' in the 100$a field. 2) Create a second authority with the same value in the same field. 3) Export this second authority as iso2709 (Save -> MARC (Unicode/UTF-8)) 4) Run bulkmarcimport.pl with the following parameters: perl bulkmarcimport.pl -a --file=/kohadevbox/koha/auth-xxxx.utf8 --match='Heading,100$a' -l /kohadevbox/koha/bulk.log 5) Check in the log file and/or through search that a third authority has been added (despite using the --match option) 6) Apply the patch 7) Delete the 3 authorities and repeat step 1 to 4. 8) Check that a third authority has not been added (--match worked) Hi, I've added a test plan. Created attachment 172049 [details] [review] Bug 18273: Do not insert authority if there already are duplicates in koha Test plan: 1) Create an authority with a unique value in a searchable field, for instance a PERSO_NAME authority with 'BZ18273' in the 100$a field. 2) Create a second authority with the same value in the same field. 3) Export this second authority as iso2709 (Save -> MARC (Unicode/UTF-8)) 4) Run bulkmarcimport.pl with the following parameters: perl bulkmarcimport.pl -a --file=/kohadevbox/koha/auth-xxxx.utf8 --match='Heading,100$a' -l /kohadevbox/koha/bulk.log 5) Check in the log file and/or through search that a third authority has been added (despite using the --match option) 6) Apply the patch 7) Delete the 3 authorities and repeat step 1 to 4. 8) Check that a third authority has not been added (--match worked) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Thanks Matts, Super trivial patch working as I'd expect. Passing QA Updating this to "bug". Pushed for 24.11! Well done everyone, thank you! Backported to 24.05.x for upcoming 24.05.06 Pushed to 23.11.x for 23.11.11 |