From ca9bae2665287c6a284724fc25bcb9e6cfdd54ee Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Wed, 22 Jan 2014 23:12:25 -0500 Subject: [PATCH] Support authority records with marc_export --since We can make the --since clause a little more flexible and let it handle authority records as well. Signed-off-by: Dan Scott --- Open-ILS/src/support-scripts/marc_export.in | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Open-ILS/src/support-scripts/marc_export.in b/Open-ILS/src/support-scripts/marc_export.in index d25322801d..e2e0896b41 100755 --- a/Open-ILS/src/support-scripts/marc_export.in +++ b/Open-ILS/src/support-scripts/marc_export.in @@ -83,7 +83,7 @@ Usage: $0 [options] --timeout Timeout for exporting a single record; increase if you are using --holdings and are exporting records that have a lot of items attached to them. - --type or -t Record type (BIBLIO, AUTHORITY) [BIBLIO] + --type Record type (BIBLIO, AUTHORITY) [BIBLIO] --all or -a Export all records; ignores input list --library Export the bibliographic records that have attached holdings for the listed library or libraries as @@ -213,11 +213,15 @@ if ($all_records) { # get list of eligible ids if --since my %ids; if (defined $since) { + my $rtype = 'bre'; + if ($type eq 'authority') { + $rtype = 'are'; + } my $recids = $editor->json_query({ - select => { bre => ['id'] }, - from => { bre => {} }, + select => { $rtype => ['id'] }, + from => { $rtype => {} }, where => { - '+bre' => { + "+$rtype" => { deleted => 'f', $dtype => { '>=' => $since, -- 2.11.0