[open-ils-commits] [GIT] Evergreen ILS branch rel_3_2 updated. 289e5ee465c60f94842c85ca9a8f4b308488d64f

Evergreen Git git at git.evergreen-ils.org
Fri Mar 8 18:14:46 EST 2019


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_3_2 has been updated
       via  289e5ee465c60f94842c85ca9a8f4b308488d64f (commit)
       via  448118772255aaecf7e8d7e483f53e8da67d5c03 (commit)
      from  331db31999bbd3747b62e6348d3e1d27117c7949 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 289e5ee465c60f94842c85ca9a8f4b308488d64f
Author: Remington Steed <rjs7 at calvin.edu>
Date:   Fri Mar 8 15:27:45 2019 -0500

    LP1793196 Fix console error when none selected
    
    If you open the dropdown and close it without selecting anything, the
    console shows an error complaining that $scope.selected is undefined.
    This commit checks that it exists in that case before using it.
    
    Signed-off-by: Remington Steed <rjs7 at calvin.edu>
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>

diff --git a/Open-ILS/web/js/ui/default/staff/services/ui.js b/Open-ILS/web/js/ui/default/staff/services/ui.js
index 59ff1c8414..0fe9918e37 100644
--- a/Open-ILS/web/js/ui/default/staff/services/ui.js
+++ b/Open-ILS/web/js/ui/default/staff/services/ui.js
@@ -982,7 +982,7 @@ function($uibModal , $interpolate , egCore) {
                     $scope.isopen = $scope.clickedopen || ($filter('filter')(
                         $scope.list,
                         $scope.selected
-                    ).length > 0 && $scope.selected.length > 0);
+                    ).length > 0 && $scope.selected && $scope.selected.length > 0);
                     if ($scope.clickedclosed) {
                         $scope.isopen = false;
                         $scope.clickedclosed = null;

commit 448118772255aaecf7e8d7e483f53e8da67d5c03
Author: Bill Erickson <berickxx at gmail.com>
Date:   Tue Feb 5 12:28:15 2019 -0500

    LP1793196 Volume batch editor offers MARC call numbers
    
    Provide call numbers extracted from the MARC record as options in the
    volume batch editor.  Call numbers to extract are based on the load-time
    classification scheme, defaulting to Generic ('1') if no default scheme
    is applied.
    
    Patch includes additional sanity checks on volume editor utility
    functions to avoid console errors referencing undefined values.
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Remington Steed <rjs7 at calvin.edu>
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>

diff --git a/Open-ILS/src/templates/staff/cat/volcopy/t_edit.tt2 b/Open-ILS/src/templates/staff/cat/volcopy/t_edit.tt2
index 7d32580f40..bb0537ce95 100644
--- a/Open-ILS/src/templates/staff/cat/volcopy/t_edit.tt2
+++ b/Open-ILS/src/templates/staff/cat/volcopy/t_edit.tt2
@@ -25,7 +25,7 @@
                         <select class="form-control" ng-model="batch.prefix" ng-options="p.id() as p.label() for p in prefix_list"></select>
                     </div>
                     <div class="col-xs-2">
-                        <input class="form-control" type="text" ng-model="batch.label"/>
+                        <eg-basic-combo-box list="batch.marcCallNumbers" selected="batch.label"></eg-basic-combo-box>
                     </div>
                     <div class="col-xs-1">
                         <select class="form-control" ng-model="batch.suffix" ng-options="s.id() as s.label() for s in suffix_list"></select>
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 1de94cf152..22a41eac02 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
@@ -1064,9 +1064,23 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
                 if ($scope.defaults.barcode_checkdigit) itemSvc.barcode_checkdigit = true;
                 if ($scope.defaults.auto_gen_barcode) itemSvc.auto_gen_barcode = true;
             }
+
+            // Fetch the list of bib-level callnumbers based on the applied
+            // classification scheme.  If none is defined, default to "1"
+            // (Generic) since it provides the most options.
+            egCore.net.request(
+                'open-ils.cat',
+                'open-ils.cat.biblio.record.marc_cn.retrieve',
+                $scope.record_id,
+                $scope.batch.classification || 1
+            ).then(function(list) {
+                $scope.batch.marcCallNumbers = [];
+                list.forEach(function(hash) {
+                    $scope.batch.marcCallNumbers.push(Object.values(hash)[0]);
+                });
+            });
         });
     }
-    $scope.fetchDefaults();
 
     $scope.$watch('defaults.statcat_filter', function() {
         $scope.saveDefaults();
@@ -1458,7 +1472,7 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
         }
 
         $scope.circTypeValue = function (x) {
-            if (x === null) return egCore.strings.UNSET;
+            if (x === null || x === undefined) return egCore.strings.UNSET;
             var s = $scope.circ_type_list.filter(function(y) {
                 return y.code() == x;
             });
@@ -1467,7 +1481,7 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
         }
 
         $scope.ageprotectName = function (x) {
-            if (x === null) return egCore.strings.UNSET;
+            if (x === null || x === undefined) return egCore.strings.UNSET;
             var s = $scope.age_protect_list.filter(function(y) {
                 return y.id() == x;
             });
@@ -1476,7 +1490,7 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
         }
 
         $scope.floatingName = function (x) {
-            if (x === null) return egCore.strings.UNSET;
+            if (x === null || x === undefined) return egCore.strings.UNSET;
             var s = $scope.floating_list.filter(function(y) {
                 return y.id() == x;
             });
@@ -1485,7 +1499,7 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
         }
 
         $scope.circmodName = function (x) {
-            if (x === null) return egCore.strings.UNSET;
+            if (x === null || x === undefined) return egCore.strings.UNSET;
             var s = $scope.circ_modifier_list.filter(function(y) {
                 return y.code() == x;
             });
@@ -1508,6 +1522,9 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
 
                 $scope.record_id = data.record_id;
 
+                // Fetch defaults 
+                $scope.fetchDefaults();
+
                 function fetchRaw () {
                     if (!$scope.only_vols) $scope.dirty = true;
                     $scope.add_vols_copies = true;

-----------------------------------------------------------------------

Summary of changes:
 .../src/templates/staff/cat/volcopy/t_edit.tt2     |  2 +-
 .../web/js/ui/default/staff/cat/volcopy/app.js     | 27 ++++++++++++++++++----
 Open-ILS/web/js/ui/default/staff/services/ui.js    |  2 +-
 3 files changed, 24 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list