Bug 29440: Refactor and clean up bulkmarcimport.pl
authorDavid Gustafsson <david.gustafsson@ub.gu.se>
Wed, 15 Mar 2017 10:30:50 +0000 (11:30 +0100)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Mon, 18 Mar 2024 10:03:42 +0000 (11:03 +0100)
commit261baeff85ac2e1a6d546582dd87e352fc9f9776
treefbf5875f11a3a00afa3fff5afe08be5420d1df9f
parent2d668f22dcde6c9aadc35aa17b886282dd184171
Bug 29440: Refactor and clean up bulkmarcimport.pl

To test:
1) Import biblios using ./bulkmarcimport.pl -v -b -file biblios.mrc -insert -update -c=MARC21 -match "control-number,001" -n=1 -l "/tmp/import.log"
2) Verify in /tmp/import.log that one biblio has been inserted
3) Import again without the "-n" option, verify that one biblio has been
   updated and the rest inserted
4) In the staff interface search the catalog for some string appearing in
   the imported biblios to verify records have been indexed
5) View/edit some of the biblios the staff interface to very have been
   properly imported
6) Import authorities using ./bulkmarcimport.pl -v -m=MARCXML -a -file authorities.xml -insert -update -c=MARC21 -keepids="024a" -match "heading-main,100a" -l "/tmp/import.log" -yaml="/tmp/ids.yml"
7) Go to the authorities page and find the imported authority by for example search for a
   400 or 100 field value. Verify that the 001 field of the incoming record has been moved to 024a.
   Also check that the value of 024a appear as a key in /tmp/ids.yml.
8) Edit the authorities.xml file and change the value of field 400a
9) Import authorities again using the same options
10) Verify that the 400a field of the authority in Koha has not been
   updated (the import was skippped since revision did not change)
11) Edit authorities.xml, replace the value of field 005 in the file with field 005
    of the authority in Koha incremented by one
12) Import again with the same options
13) Verify that the 400a field of the authority in Koha now have been
    updated

Signed-off-by: MichaƂ Kula <148193449+mkibp@users.noreply.github.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
C4/Biblio.pm
misc/migration_tools/bulkmarcimport.pl