[open-ils-commits] r17403 - in branches/rel_1_6/Open-ILS: src/perlmods/OpenILS/Application src/perlmods/OpenILS/Application/Cat web/js/ui/default/acq/common web/js/ui/default/vandelay (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Aug 31 11:18:06 EDT 2010


Author: dbs
Date: 2010-08-31 11:18:04 -0400 (Tue, 31 Aug 2010)
New Revision: 17403

Modified:
   branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Cat/BibCommon.pm
   branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm
   branches/rel_1_6/Open-ILS/web/js/ui/default/acq/common/li_table.js
   branches/rel_1_6/Open-ILS/web/js/ui/default/vandelay/vandelay.js
Log:
Backport r71394 and r17395 from trunk: bib_source selection in Vandelay

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.

We also pass the record types to the MARC editor from the Vandelay and
acquisitions interfaces, for however much good that does for us (not much
at the moment).


Modified: branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Cat/BibCommon.pm
===================================================================
--- branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Cat/BibCommon.pm	2010-08-31 14:54:23 UTC (rev 17402)
+++ branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Cat/BibCommon.pm	2010-08-31 15:18:04 UTC (rev 17403)
@@ -86,6 +86,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: branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm
===================================================================
--- branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm	2010-08-31 14:54:23 UTC (rev 17402)
+++ branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm	2010-08-31 15:18:04 UTC (rev 17403)
@@ -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); #$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)) {

Modified: branches/rel_1_6/Open-ILS/web/js/ui/default/acq/common/li_table.js
===================================================================
--- branches/rel_1_6/Open-ILS/web/js/ui/default/acq/common/li_table.js	2010-08-31 14:54:23 UTC (rev 17402)
+++ branches/rel_1_6/Open-ILS/web/js/ui/default/acq/common/li_table.js	2010-08-31 15:18:04 UTC (rev 17403)
@@ -971,7 +971,7 @@
         }
         var self = this;
         win.xulG = {
-            record : {marc : li.marc()},
+            record : {marc : li.marc(), "rtype": "bre"},
             save : {
                 label: 'Save Record', // XXX I18N
                 func: function(xmlString) {

Modified: branches/rel_1_6/Open-ILS/web/js/ui/default/vandelay/vandelay.js
===================================================================
--- branches/rel_1_6/Open-ILS/web/js/ui/default/vandelay/vandelay.js	2010-08-31 14:54:23 UTC (rev 17402)
+++ branches/rel_1_6/Open-ILS/web/js/ui/default/vandelay/vandelay.js	2010-08-31 15:18:04 UTC (rev 17403)
@@ -951,6 +951,13 @@
     netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
     win = window.open('/xul/server/cat/marcedit.xul'); // XXX version?
 
+    var type;
+    if (currentType == 'bib') {
+        type = 'bre';
+    } else {
+        type = 'are';
+    }
+
     function onsave(r) {
         // after the record is saved, reload the HTML display
         var stat = r.recv().content();
@@ -962,7 +969,7 @@
     }
 
     win.xulG = {
-        record : {marc : rec.marc()},
+        record : {marc : rec.marc(), "rtype": type},
         save : {
             label: dojo.byId('vl-marc-edit-save-label').innerHTML,
             func: function(xmlString) {



More information about the open-ils-commits mailing list