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>
This commit is contained in:
Sophie Meynieux 2012-06-10 12:23:20 +02:00 committed by Paul Poulain
parent c13d4faff7
commit f86ccea202
1 changed files with 1 additions and 1 deletions

View File

@ -687,7 +687,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'});
}