[open-ils-commits] r20131 - in branches/rel_2_1/Open-ILS/xul/staff_client/server: cat circ (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sat Apr 16 17:33:47 EDT 2011
Author: phasefx
Date: 2011-04-16 17:33:41 -0400 (Sat, 16 Apr 2011)
New Revision: 20131
Modified:
branches/rel_2_1/Open-ILS/xul/staff_client/server/cat/copy_browser.js
branches/rel_2_1/Open-ILS/xul/staff_client/server/circ/copy_status.js
Log:
fix Add Items off of volumes by changing the label key in copy_shortcut to callnumber composite key
Modified: branches/rel_2_1/Open-ILS/xul/staff_client/server/cat/copy_browser.js
===================================================================
--- branches/rel_2_1/Open-ILS/xul/staff_client/server/cat/copy_browser.js 2011-04-16 21:33:37 UTC (rev 20130)
+++ branches/rel_2_1/Open-ILS/xul/staff_client/server/cat/copy_browser.js 2011-04-16 21:33:41 UTC (rev 20131)
@@ -256,11 +256,22 @@
list = util.functional.map_list(
list,
function (o) {
- var ou_id = obj.map_acn['acn_' + o].owning_lib();
+ var call_number = obj.map_acn['acn_'+o];
+ var ou_id = call_number.owning_lib();
var volume_id = o;
- var label = obj.map_acn['acn_' + o].label();
+ var label = call_number.label();
+ var acnc_id = typeof call_number.label_class() == 'object'
+ ? call_number.label_class().id()
+ : call_number.label_class();
+ var acnp_id = typeof call_number.prefix() == 'object'
+ ? call_number.prefix().id()
+ : call_number.prefix();
+ var acns_id = typeof call_number.suffix() == 'object'
+ ? call_number.suffix().id()
+ : call_number.suffix();
if (!copy_shortcut[ou_id]) copy_shortcut[ou_id] = {};
- copy_shortcut[ou_id][ label ] = volume_id;
+ var callnumber_composite_key = acnc_id + ':' + acnp_id + ':' + label + ':' + acns_id;
+ copy_shortcut[ou_id][ callnumber_composite_key ] = volume_id;
return ou_id;
}
Modified: branches/rel_2_1/Open-ILS/xul/staff_client/server/circ/copy_status.js
===================================================================
--- branches/rel_2_1/Open-ILS/xul/staff_client/server/circ/copy_status.js 2011-04-16 21:33:37 UTC (rev 20130)
+++ branches/rel_2_1/Open-ILS/xul/staff_client/server/circ/copy_status.js 2011-04-16 21:33:41 UTC (rev 20131)
@@ -492,16 +492,28 @@
if (! map_acn[volume_id]) {
map_acn[ volume_id ] = obj.network.simple_request('FM_ACN_RETRIEVE.authoritative',[ volume_id ]);
}
- var record_id = map_acn[ volume_id ].record();
- var ou_id = map_acn[ volume_id ].owning_lib();
- var label = map_acn[ volume_id ].label();
+ var call_number = obj.map_acn[volume_id];
+ var record_id = call_number.record();
+ var ou_id = call_number.owning_lib();
+ var label = call_number.label();
+ var acnc_id = typeof call_number.label_class() == 'object'
+ ? call_number.label_class().id()
+ : call_number.label_class();
+ var acnp_id = typeof call_number.prefix() == 'object'
+ ? call_number.prefix().id()
+ : call_number.prefix();
+ var acns_id = typeof call_number.suffix() == 'object'
+ ? call_number.suffix().id()
+ : call_number.suffix();
+ if (!copy_shortcut[ou_id]) copy_shortcut[ou_id] = {};
+ var callnumber_composite_key = acnc_id + ':' + acnp_id + ':' + label + ':' + acns_id;
if (!copy_shortcut[record_id]) {
copy_shortcut[record_id] = {};
}
if (!copy_shortcut[record_id][ou_id]) {
copy_shortcut[record_id][ou_id] = {};
}
- copy_shortcut[record_id][ou_id][ label ] = volume_id;
+ copy_shortcut[record_id][ou_id][ callnumber_composite_key ] = volume_id;
}
More information about the open-ils-commits
mailing list