[open-ils-commits] r17395 - in trunk/Open-ILS/src/perlmods/OpenILS/Application: . Cat (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Aug 30 23:20:30 EDT 2010
Author: dbs
Date: 2010-08-30 23:20:28 -0400 (Mon, 30 Aug 2010)
New Revision: 17395
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat/BibCommon.pm
trunk/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm
Log:
Make the bib source selector in Vandelay MARC batch importer/exporter work
The bib source selector in Vandelay offered a drop down of the available
bib source selections, but never actually affected the source attribute
of the bib records in biblio.record_entry when they were imported. This
commit finishes off the logic that was almost there.
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat/BibCommon.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat/BibCommon.pm 2010-08-31 03:17:35 UTC (rev 17394)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat/BibCommon.pm 2010-08-31 03:20:28 UTC (rev 17395)
@@ -89,6 +89,9 @@
return $evt if $evt;
}
+ # Silence warnings when _find_tcn_info() fails
+ $tcn ||= '';
+ $tcn_source ||= '';
$logger->info("user ".$e->requestor->id.
" creating new biblio entry with tcn=$tcn and tcn_source $tcn_source");
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm 2010-08-31 03:17:35 UTC (rev 17394)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm 2010-08-31 03:20:28 UTC (rev 17395)
@@ -44,6 +44,7 @@
x => 'holdings',
y => 'holdings',
z => 'auth',
+ ' ' => 'bib',
);
sub initialize {}
@@ -624,6 +625,13 @@
my $update_queue_func = 'update_vandelay_bib_queue';
my $rec_class = 'vqbr';
+ my %bib_sources;
+ my $editor = new_editor();
+ my $sources = $editor->search_config_bib_source({id => {'!=' => undef}});
+ foreach my $src (@$sources) {
+ $bib_sources{$src->id} = $src->source;
+ }
+
if($type eq 'auth') {
$overlay_func =~ s/bib/auth/o;
$auto_overlay_func = s/bib/auth/o;
@@ -737,8 +745,7 @@
# No overlay / merge occurred. Do a traditional record import by creating a new record
if($type eq 'bib') {
- $record = OpenILS::Application::Cat::BibCommon->biblio_record_xml_import($e, $rec->marc); #$rec->bib_source
-
+ $record = OpenILS::Application::Cat::BibCommon->biblio_record_xml_import($e, $rec->marc, $bib_sources{$rec->bib_source});
} else {
$record = OpenILS::Application::Cat::AuthCommon->import_authority_record($e, $rec->marc); #$source);
More information about the open-ils-commits
mailing list