[Bug 2816] New: MARC import matching bibs against previously reverted batches
http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=2816 Summary: MARC import matching bibs against previously reverted batches Product: Koha Version: HEAD Platform: PC OS/Version: All Status: NEW Severity: normal Priority: P3 Component: MARC Bibliographic record staging/import AssignedTo: galen.charlton@liblime.com ReportedBy: rch@liblime.com QAContact: koha-bugs@lists.koha.org Matcher.pm seems to be returning a positive match for previously reverted imports. This results in new imports batches staging successfully, but failing to import, since it silently matches against a non-existent biblionumber. The matching bib is _not_ stored in import_biblios, but does exist in Details for an import: original import_record_id=118828 reverted, then later, the same batch imported again. second import_record_id=1157005 mysql> select * from import_biblios where matched_biblionumber=108610; +------------------+----------------------+----------------+-----------------+--------------------------------------------+--------+----------------+------+-----------+ | import_record_id | matched_biblionumber | control_number | original_source | title | author | isbn | issn | has_items | +------------------+----------------------+----------------+-----------------+--------------------------------------------+--------+----------------+------+-----------+ | 118828 | 108610 | NULL | NULL | Clinical treatment of the violent person / | NULL | 0898622778 | 0 | NULL | 0 | mysql> select * from import_biblios where import_record_id=1157005; +------------------+----------------------+----------------+-----------------+--------------------------------------------+--------+----------------+------+-----------+ | import_record_id | matched_biblionumber | control_number | original_source | title | author | isbn | issn | has_items | +------------------+----------------------+----------------+-----------------+--------------------------------------------+--------+----------------+------+-----------+ | 1157005 | NULL | NULL | NULL | Clinical treatment of the violent person / | NULL | 0898622778 | 0 | NULL | 0 | mysql> select import_record_id,import_batch_id,record_sequence,import_date,overlay_status,status,import_error from import_records where import_record_id=118828; +------------------+-----------------+-----------------+-------------+----------------+----------+--------------+ | import_record_id | import_batch_id | record_sequence | import_date | overlay_status | status | import_error | +------------------+-----------------+-----------------+-------------+----------------+----------+--------------+ | 118828 | 11 | 5 | NULL | auto_match | reverted | NULL | mysql> select import_record_id,import_batch_id,record_sequence,import_date,overlay_status,status,import_error from import_records where import_record_id=1157005; +------------------+-----------------+-----------------+-------------+----------------+--------+--------------+ | import_record_id | import_batch_id | record_sequence | import_date | overlay_status | status | import_error | +------------------+-----------------+-----------------+-------------+----------------+--------+--------------+ | 1157005 | 386 | 5 | NULL | auto_match | staged | NULL | when i commit batch 386, import_record 1157005 is trying to match biblionumber 108610. Adding some warns: processing 1157005 ... title: Clinical treatment of the violent person / edited by Loren H. Roth. at /home/masscat/kohaclone/C4/ImportBatch.pm line 478. matched biblionumber: 108610 at /home/masscat/kohaclone/C4/ImportBatch.pm line 489. DBD::mysql::st execute failed: Column 'biblioitemnumber' cannot be null at /home/masscat/kohaclone/C4/Items.pm line 1850. Can't call method "append_fields" on an undefined value at /home/masscat/kohaclone/C4/Items.pm line 2040. mysql> SELECT * FROM import_record_matches WHERE import_record_id = 1157005; +------------------+--------------------+-------+ | import_record_id | candidate_match_id | score | +------------------+--------------------+-------+ | 1157005 | 108610 | 1000 | So, despite a score of 1000 in import_record_matches, this match did not get stored in import_biblios. The import that added the biblio has been reverted, yet we still get a match from import_record_matches . At first glance, GetBestRecordMatch does not seem to obey the threshold parameter. mysql> SELECT * FROM import_record_matches WHERE import_record_id = 1157005; +------------------+--------------------+-------+ | import_record_id | candidate_match_id | score | +------------------+--------------------+-------+ | 1157005 | 108610 | 1000 | mysql> SELECT * FROM import_record_matches WHERE import_record_id = 118828; +------------------+--------------------+-------+ | import_record_id | candidate_match_id | score | +------------------+--------------------+-------+ | 118828 | 108610 | 1000 | ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
participants (1)
-
bugzilla-daemon@pippin.metavore.com