[Bug 39436] New: C4/Matcher does not check if the biblio returned by search exists in DB
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39436 Bug ID: 39436 Summary: C4/Matcher does not check if the biblio returned by search exists in DB Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: baptiste.wojtkowski@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl C4/Matcher does not check if the biblio returned by search exists in DB. This can be a problem for example if you then try to attach a command to the biblio -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39436 --- Comment #1 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Solution should look like this, but I don't have a testplan : diff --git a/C4/Matcher.pm b/C4/Matcher.pm index 9369782f..8c6075f6 100644 --- a/C4/Matcher.pm +++ b/C4/Matcher.pm @@ -721,8 +721,11 @@ sub get_matches { ( $biblionumber_tag > 10 ) ? $target_record->field($biblionumber_tag)->subfield($biblionumber_subfield) : $target_record->field($biblionumber_tag)->data(); - $matches->{$id}->{score} += $matchpoint->{score}; - $matches->{$id}->{record} = $target_record; + my $biblio = Koha::Biblio->find($id); + if ($biblio){ + $matches->{$id}->{score} += $matchpoint->{score}; + $matches->{$id}->{record} = $target_record; + } } } -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39436 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #2 from David Cook <dcook@prosentient.com.au> --- I'd imagine the test plan would be to create the record in the DB and index it, export the record, turn off the background indexer, delete the record, import the record with a matching rule for the Koha identifier (e.g. 999$c in MARC21 - not sure of UNIMARC equivalent). -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39436 --- Comment #3 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Hi David, thx for the test plan ! Do you know how to stop the background indexer in ktd ? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39436 --- Comment #4 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Created attachment 179717 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=179717&action=edit BZ39436: Have the matcher check the existence of the record returned by search engine TEST PLAN: TBD -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org