Bug 7329 [Followup] : when reverting an import, keep matching biblionumber in batch table, if items are not deleted beacause on loan.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 45784a7183)
This commit is contained in:
Sophie Meynieux 2012-06-10 12:23:20 +02:00 committed by Jared Camins-Esakov
parent 9afc11a9eb
commit 89fe898ffe
1 changed files with 1 additions and 1 deletions

View File

@ -616,7 +616,7 @@ sub BatchRevertBibRecords {
$num_items_deleted += BatchRevertItems($rowref->{'import_record_id'}, $rowref->{'matched_biblionumber'});
SetImportRecordStatus($rowref->{'import_record_id'}, 'reverted');
}
my $sth2 = $dbh->prepare_cached("UPDATE import_biblios SET matched_biblionumber = NULL WHERE import_record_id = ?");
my $sth2 = $dbh->prepare_cached("UPDATE import_biblios LEFT JOIN import_items USING (import_record_id) SET matched_biblionumber = NULL WHERE import_record_id = ? AND status != 'imported'" );
$sth2->execute($rowref->{'import_record_id'});
}