From: dbs Date: Mon, 6 Sep 2010 07:45:28 +0000 (+0000) Subject: Backport just the bib-source setting portion of r17403 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3fbf12677535c825541805fe6989357c30149b1e;p=Evergreen.git Backport just the bib-source setting portion of r17403 When importing a set of records from Vandelay, the bib source selection widget on the Vandelay screen should actually affect the biblio.record_entry.source value of the imported records. git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6_1@17493 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm b/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm index 0e7903ad88..570eeab249 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm @@ -541,6 +541,13 @@ sub import_record_list_impl { my %queues; my @ingest_queue; + 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; + } + my $ingest_ses = OpenSRF::AppSession->connect('open-ils.ingest'); for my $rec_id (@$rec_ids) { @@ -570,11 +577,11 @@ sub import_record_list_impl { if(defined $overlay_target) { $logger->info("vl: overlaying record $overlay_target"); $record = OpenILS::Application::Cat::BibCommon->biblio_record_replace_marc( - $e, $overlay_target, $rec->marc); #$rec->bib_source + $e, $overlay_target, $rec->marc, $bib_sources{$rec->bib_source}); } else { $logger->info("vl: importing new record"); $record = OpenILS::Application::Cat::BibCommon->biblio_record_xml_import( - $e, $rec->marc); #$rec->bib_source + $e, $rec->marc, $bib_sources{$rec->bib_source}); } if($U->event_code($record)) {