From 71cbc3700fc4d113a3343ef1bba893b4cfc8266b Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 7 Feb 2013 09:57:47 -0500 Subject: [PATCH] Bug 9523: importing staged bib records hangs if a matched bib has been deleted Test Plan: 1) Stage a MARC record file that will have matches with existing records 2) Delete the bib from Koha that was matched on 3) Attempt to import the records into Koha, the import will hang 4) Apply the patch 5) Reload manage-marc-import.pl and attempt to import again, this time it should succeed. Signed-off-by: Galen Charlton Signed-off-by: Jonathan Druart Signed-off-by: Jared Camins-Esakov (cherry picked from commit ea23dbeab2a2f5cf6be64e707ea56b3ea89e437b) Signed-off-by: Jared Camins-Esakov --- C4/ImportBatch.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm index 61857606be..a5befe69da 100644 --- a/C4/ImportBatch.pm +++ b/C4/ImportBatch.pm @@ -1036,6 +1036,7 @@ sub GetBestRecordMatch { my $dbh = C4::Context->dbh; my $sth = $dbh->prepare("SELECT candidate_match_id FROM import_record_matches + JOIN biblio ON ( candidate_match_id = biblionumber ) WHERE import_record_id = ? ORDER BY score DESC, candidate_match_id DESC"); $sth->execute($import_record_id); -- 2.39.2