[open-ils-commits] r18394 - in branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application: . Acq Cat (gmc)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Oct 19 19:47:26 EDT 2010


Author: gmc
Date: 2010-10-19 19:47:25 -0400 (Tue, 19 Oct 2010)
New Revision: 18394

Modified:
   branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm
   branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm
   branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm
   branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Cat/BibCommon.pm
   branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm
Log:
backport r13981 and r17493

* (Bill Erickson) don't call ingest from within bib create/overlay code
  before the changes would have been comitted
* (Dan Scott) make selecting the bib source during Vandelay imports
  work

Signed-off-by: Galen Charlton <gmc at esilibrary.com>


Modified: branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm
===================================================================
--- branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm	2010-10-19 20:37:34 UTC (rev 18393)
+++ branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm	2010-10-19 23:47:25 UTC (rev 18394)
@@ -568,7 +568,7 @@
     unless($li->eg_bib_id) {
 
        my $record = OpenILS::Application::Cat::BibCommon->biblio_record_xml_import(
-            $e, $li->marc, undef, undef, undef, 1); #$rec->bib_source
+            $e, $li->marc); #$rec->bib_source
 
         if($U->event_code($record)) {
             $e->rollback;

Modified: branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm
===================================================================
--- branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm	2010-10-19 20:37:34 UTC (rev 18393)
+++ branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm	2010-10-19 23:47:25 UTC (rev 18394)
@@ -775,11 +775,9 @@
     my $record = OpenILS::Application::Cat::BibCommon->biblio_record_xml_import(
         $mgr->editor, 
         $li->marc, 
+        undef, # bib source
         undef, 
-        undef, 
         1, # override tcn collisions
-        1, # no-ingest
-        undef # $rec->bib_source
     ); 
 
     if($U->event_code($record)) {

Modified: branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Cat/BibCommon.pm
===================================================================
--- branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Cat/BibCommon.pm	2010-10-19 20:37:34 UTC (rev 18393)
+++ branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Cat/BibCommon.pm	2010-10-19 23:47:25 UTC (rev 18394)
@@ -36,7 +36,7 @@
 
 
 sub biblio_record_replace_marc  {
-	my($class, $e, $recid, $newxml, $source, $fixtcn, $override, $noingest) = @_;
+	my($class, $e, $recid, $newxml, $source, $fixtcn, $override) = @_;
 
 	my $rec = $e->retrieve_biblio_record_entry($recid)
 		or return $e->die_event;
@@ -70,17 +70,11 @@
 	$rec->marc( $U->entityize( $marcdoc->documentElement->toString ) );
 	$e->update_biblio_record_entry($rec) or return $e->die_event;
 
-    unless ($noingest) {
-        # we don't care about the result, just fire off the request
-        my $ses = OpenSRF::AppSession->create('open-ils.ingest');
-        $ses->request('open-ils.ingest.full.biblio.record', $recid);
-    }
-
 	return $rec;
 }
 
 sub biblio_record_xml_import {
-	my($class, $e, $xml, $source, $auto_tcn, $override, $noingest) = @_;
+	my($class, $e, $xml, $source, $auto_tcn, $override) = @_;
 
 	my( $evt, $tcn, $tcn_source, $marcdoc );
 
@@ -109,12 +103,6 @@
     $record = $e->create_biblio_record_entry($record) or return $e->die_event;
 	$logger->info("marc create/import created new record ".$record->id);
 
-    unless ($noingest) {
-        # we don't care about the result, just fire off the request
-        my $ses = OpenSRF::AppSession->create('open-ils.ingest');
-        $ses->request('open-ils.ingest.full.biblio.record', $record->id);
-    }
-
 	return $record;
 }
 

Modified: branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm
===================================================================
--- branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm	2010-10-19 20:37:34 UTC (rev 18393)
+++ branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm	2010-10-19 23:47:25 UTC (rev 18394)
@@ -160,12 +160,11 @@
 	return $e->die_event unless $e->checkauth;
 	return $e->die_event unless $e->allowed('CREATE_MARC', $e->requestor->ws_ou);
 
-    my $no_ingest = 1;
     my $fix_tcn = $self->api_name =~ /replace/o;
     my $override = $self->api_name =~ /override/o;
 
     my $res = OpenILS::Application::Cat::BibCommon->biblio_record_replace_marc(
-        $e, $recid, $newxml, $source, $fix_tcn, $override, $no_ingest);
+        $e, $recid, $newxml, $source, $fix_tcn, $override);
 
     $e->commit unless $U->event_code($res);
 
@@ -257,7 +256,7 @@
 
 	my $override = $self->api_name =~ /override/;
     my $record = OpenILS::Application::Cat::BibCommon->biblio_record_xml_import(
-        $e, $xml, $source, $auto_tcn, $override, 1);
+        $e, $xml, $source, $auto_tcn, $override);
 
     return $record if $U->event_code($record);
 

Modified: branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm
===================================================================
--- branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm	2010-10-19 20:37:34 UTC (rev 18393)
+++ branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm	2010-10-19 23:47:25 UTC (rev 18394)
@@ -541,6 +541,13 @@
     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 @@
             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, undef, undef, undef, 1); #$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, undef, undef, undef, 1); #$rec->bib_source
+                    $e, $rec->marc, $bib_sources{$rec->bib_source});
             }
 
             if($U->event_code($record)) {



More information about the open-ils-commits mailing list