From 61d82bdd525f26323c07e756411e823e1d9fce32 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 26 Jan 2016 14:06:57 -0500 Subject: [PATCH 1/1] webstaff: grab default call number from bib when creating volume Signed-off-by: Galen Charlton Signed-off-by: Kathy Lussier --- .../web/js/ui/default/staff/cat/volcopy/app.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js index 7b72add017..f347be7cbd 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js @@ -1091,7 +1091,23 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore , cn.label_class( $scope.defaults.classification || 1 ); cn.owning_lib( proto.owner || egCore.auth.user().ws_ou() ); cn.record( $scope.record_id ); - if (proto.label) cn.label( proto.label ); + if (proto.label) { + cn.label( proto.label ); + } else { + egCore.net.request( + 'open-ils.cat', + 'open-ils.cat.biblio.record.marc_cn.retrieve', + $scope.record_id, + $scope.defaults.classification || 1 + ).then(function(cn_array) { + if (cn_array.length > 0) { + for (var field in cn_array[0]) { + cn.label( cn_array[0][field] ); + break; + } + } + }); + } var cp = new egCore.idl.acp(); cp.call_number( cn ); -- 2.43.2