From e14c1702b446111f98ce6736aa7544df14b03d1d Mon Sep 17 00:00:00 2001 From: Josef Moravec Date: Mon, 30 Sep 2019 09:28:40 +0000 Subject: [PATCH] Bug 23696: take deleted biblios into account when building oai sets Test plan: 0) do not apply the patch 1) set up OAI and create at least one set 2) run build_oai_sets.pl 3) remember/write down number of records added 4) delete a biblio, the is included in set 5) run buid_oai_sets.pl again 6) the set is 1 record smaller 7) apply the patch 8) run build_oai_sets.pl 9) the number of record should be the same as in 3) Signed-off-by: Michal Denar Signed-off-by: Marcel de Rooy Signed-off-by: Jonathan Druart --- misc/migration_tools/build_oai_sets.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/misc/migration_tools/build_oai_sets.pl b/misc/migration_tools/build_oai_sets.pl index 64addad2ce..c7b73a2d7d 100755 --- a/misc/migration_tools/build_oai_sets.pl +++ b/misc/migration_tools/build_oai_sets.pl @@ -75,6 +75,11 @@ my $query = qq{ FROM biblio_metadata WHERE format='marcxml' AND `schema` = ? + UNION + SELECT biblionumber, metadata + FROM deletedbiblio_metadata + WHERE format='marcxml' + AND `schema` = ? }; if($length) { $query .= "LIMIT $length"; @@ -83,7 +88,7 @@ if($length) { } } my $sth = $dbh->prepare($query); -$sth->execute( C4::Context->preference('marcflavour') ); +$sth->execute( C4::Context->preference('marcflavour'), C4::Context->preference('marcflavour')); my $results = $sth->fetchall_arrayref({}); print "done.\n" if $verbose; -- 2.39.5