debugging aids
authorJason Etheridge <jason@esilibrary.com>
Tue, 8 Mar 2011 19:37:54 +0000 (14:37 -0500)
committerJason Etheridge <jason@esilibrary.com>
Tue, 8 Mar 2011 19:37:54 +0000 (14:37 -0500)
Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js

index 3c948b1..78e6110 100644 (file)
@@ -671,10 +671,11 @@ g.gather_copies = function() {
         */
 
         var barcodes = [];
-
+        var v_count = 0;
         for (var i = 0; i < nl.length; i++) {
             if ( nl[i].getAttribute('rel_vert_pos') == rel_vert_pos_barcode ) barcodes.push( nl[i] );
             if ( nl[i].getAttribute('rel_vert_pos') == rel_vert_pos_call_number )  {
+                v_count++;
                 var ou_id = nl[i].getAttribute('ou_id');
                 var acnc_id = nl[i].getAttribute('acnc_id');
                 var acnp_id = nl[i].getAttribute('acnp_id');
@@ -696,6 +697,7 @@ g.gather_copies = function() {
                 }
             }
         };
+        dump('volume_copy_creator: processed ' + nl.length + ' textbox nodes, consisting of ' + barcodes.length + ' barcodes and ' + v_count + 'volumes\n');
 
         for (var i = 0; i < barcodes.length; i++) {
             var acp_id = barcodes[i].getAttribute('acp_id') || g.new_acp_id--;
@@ -705,9 +707,11 @@ g.gather_copies = function() {
             var bmp_id = barcodes[i].getAttribute('bmp_id');
 
             if (typeof volumes_hash[ou_id] == 'undefined') {
+                alert('1: I want to remove this soon, so alert me if it is getting used, ou_id = ' + ou_id);
                 volumes_hash[ou_id] = {}
             }
             if (typeof volumes_hash[ou_id][callnumber] == 'undefined') {
+                alert('2: when does this happen, and why? ou_id = ' + ou_id + ' callnumber = ' + callnumber);
                 volumes_hash[ou_id][callnumber] = {
                     'call_number_data' : {},
                     'barcode_data' : []