https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29654

David Nind <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Text to go in the|                            |This enhancement adds a
      release notes|                            |`match_record_id` option to
                   |                            |the
                   |                            |./misc/migration_tools/bulk
                   |                            |marcimport.pl script. If a
                   |                            |record matches based on the
                   |                            |ID, it is updated.
                   |                            |Previously, without this
                   |                            |option, a record (but not
                   |                            |the items) would be
                   |                            |duplicated.
                   |                            |
                   |                            |Example use
                   |                            |case: allows updates to
                   |                            |previously exported
                   |                            |records, without creating
                   |                            |duplicate records.

--- Comment #15 from David Nind <[email protected]> ---
Testing notes (using KTD):

1. Running the command in step 2 generates this output - a duplicate record is
inserted, but no item (I used record 262 - Programming perl):

./misc/migration_tools/bulkmarcimport.pl -m="MARCXML" -v -b -file
bib-262.marcxml -insert -update -c=MARC21 -l "/tmp/import.log"
Using --update without --match or --isbn seems to be useless.
Characteristic MARC flavour: MARC21
Use of uninitialized value in concatenation (.) or string at
/usr/share/perl5/MARC/File/XML.pm line 399, <GEN3> chunk 2.
.DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st
execute failed: Duplicate entry '578' for key 'PRIMARY' at
/kohadevbox/koha/Koha/Object.pm line 174
ERROR: Adding items to bib 439 failed: Duplicate ID at
./misc/migration_tools/bulkmarcimport.pl line 636.

1 MARC records done in 0.155983924865723 seconds

/tmp/import.log:
 1 id;operation;status
 2 262;insert;ok
 3 439;insert items;ERROR
 4 file : bib-262.marcxml
 5 1 MARC records done in 0.155983924865723 seconds

2. The patch still applies.

3. Running the command again for step 5 generates this output - another record
is inserted without an item (so have two duplicate records):

./misc/migration_tools/bulkmarcimport.pl -m="MARCXML" -v -b -file
bib-262.marcxml -insert -update -c=MARC21 -l "/tmp/import.log"
Using --update without --match or --isbn seems to be useless.
Characteristic MARC flavour: MARC21
Use of uninitialized value in concatenation (.) or string at
/usr/share/perl5/MARC/File/XML.pm line 399, <GEN3> chunk 2.
.DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st
execute failed: Duplicate entry '578' for key 'PRIMARY' at
/kohadevbox/koha/Koha/Object.pm line 174
ERROR: Adding items to bib 440 failed: Duplicate ID at
./misc/migration_tools/bulkmarcimport.pl line 642.

1 MARC records done in 0.161586046218872 seconds

/tmp/import.log:
 1 id;operation;status
 2 262;insert;ok
 3 440;insert items;ERROR
 4 file : bib-262.marcxml
 5 1 MARC records done in 0.161586046218872 seconds

4. Running the command again with the -match_record_id option (after deleting
the duplicate records) generates this output:

./misc/migration_tools/bulkmarcimport.pl -m="MARCXML" -v -b -file
bib-262.marcxml -insert -update -c=MARC21 -match_record_id -l "/tmp/import.log"
Using --update without --match or --isbn seems to be useless.
Characteristic MARC flavour: MARC21
Use of uninitialized value in concatenation (.) or string at
/usr/share/perl5/MARC/File/XML.pm line 399, <GEN3> chunk 2.
.
1 MARC records done in 0.153377056121826 seconds

/tmp/import.log:
 1 id;operation;status
 2 262;update;ok
 3 file : bib-262.marcxml
 4 1 MARC records done in 0.153377056121826 seconds

5. Note that with CataloguingLog system preference enabled (it is on by default
in KTD), there is no record of any changes to the record - "No log found for
Bibliographic record 262.".

6. I made a change to the exported record (edited the description in 504$a),
and this change was reflected in the record.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to