[open-ils-commits] [GIT] Evergreen ILS branch master updated. 5b5b9cce4fc9011e66019c3fb87e8b5fd749b889

Evergreen Git git at git.evergreen-ils.org
Wed Aug 8 17:03:13 EDT 2018


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, master has been updated
       via  5b5b9cce4fc9011e66019c3fb87e8b5fd749b889 (commit)
      from  913237b92bcd9278cd3608ad4d6d1048bda1d1d0 (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 5b5b9cce4fc9011e66019c3fb87e8b5fd749b889
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Jan 10 11:55:08 2018 -0500

    LP#1739460: Be more careful when gathering shelving locations
    
    Specifically, make sure we're getting the IDs, and comparing them as numbers.
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>
    Signed-off-by: Bill Erickson <berickxx at gmail.com>

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 462b5d6..72fee0e 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
@@ -1626,10 +1626,12 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
         $scope.$watch('data.copies.length', function () {
             if ($scope.data.copies) {
                 var base_orgs = $scope.data.copies.map(function(cp){
-                    return cp.circ_lib()
+                    if (isNaN(cp.circ_lib())) return Number(cp.circ_lib().id());
+                    return Number(cp.circ_lib());
                 }).concat(
                     $scope.data.copies.map(function(cp){
-                        return cp.call_number().owning_lib()
+                        if (isNaN(cp.call_number().owning_lib())) return Number(cp.call_number().owning_lib().id());
+                        return Number(cp.call_number().owning_lib());
                     })
                 ).concat(
                     [egCore.auth.user().ws_ou()]
@@ -1644,7 +1646,7 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
 
                 var final_orgs = all_orgs.filter(function(e,i,a){
                     return a.lastIndexOf(e) === i;
-                }).sort(function(a, b){return parseInt(a)-parseInt(b)});
+                }).sort(function(a, b){return a-b});
 
                 if ($scope.location_orgs.toString() != final_orgs.toString()) {
                     $scope.location_orgs = final_orgs;
diff --git a/Open-ILS/web/js/ui/default/staff/services/org.js b/Open-ILS/web/js/ui/default/staff/services/org.js
index 84731f4..e7467e2 100644
--- a/Open-ILS/web/js/ui/default/staff/services/org.js
+++ b/Open-ILS/web/js/ui/default/staff/services/org.js
@@ -54,7 +54,7 @@ function($q,  egEnv,  egAuth,  egNet , $injector) {
         while( (node = service.get(node.parent_ou())))
             nodes.push(node);
         if (as_id) 
-            return nodes.map(function(n){return n.id()});
+            return nodes.map(function(n){return Number(n.id())});
         return nodes;
     };
 
@@ -85,7 +85,7 @@ function($q,  egEnv,  egAuth,  egNet , $injector) {
         }
         descend(node);
         if (as_id) 
-            return nodes.map(function(n){return n.id()});
+            return nodes.map(function(n){return Number(n.id())});
         return nodes;
     }
 
@@ -94,7 +94,7 @@ function($q,  egEnv,  egAuth,  egNet , $injector) {
         var list = service.ancestors(node_or_id).concat(
           service.descendants(node_or_id).slice(1));
         if (as_id) 
-            return list.map(function(n){return n.id()});
+            return list.map(function(n){return Number(n.id())});
         return list;
     }
 

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

Summary of changes:
 .../web/js/ui/default/staff/cat/volcopy/app.js     |    8 +++++---
 Open-ILS/web/js/ui/default/staff/services/org.js   |    6 +++---
 2 files changed, 8 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list