[open-ils-commits] [GIT] Evergreen ILS branch master updated. 0a8b5aea097110b74164876b13b342a524fcfc99

Evergreen Git git at git.evergreen-ils.org
Wed May 23 15:16:12 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  0a8b5aea097110b74164876b13b342a524fcfc99 (commit)
      from  ebe1167a7c9c4ef79e7366a74d6f77ee130e16b1 (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 0a8b5aea097110b74164876b13b342a524fcfc99
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue May 15 17:21:00 2018 -0400

    LP#1770478: Offline org unit tree can break
    
    A thinko in the org tree reconstruction for offline mode caused the tree to be
    broken in some situations, when the orgs were not ordered strictly by ID in
    the list stored in the browser's IndexedDB storage.  This commit removes that
    requirement, and allows trees of any ID and storage ordering to be
    reconstituted.
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>
    Signed-off-by: Jeff Davis <jdavis at sitka.bclibraries.ca>
    Signed-off-by: Jason Stephenson <jason at sigio.com>

diff --git a/Open-ILS/web/js/ui/default/staff/services/lovefield.js b/Open-ILS/web/js/ui/default/staff/services/lovefield.js
index 174a420..d0cd9c1 100644
--- a/Open-ILS/web/js/ui/default/staff/services/lovefield.js
+++ b/Open-ILS/web/js/ui/default/staff/services/lovefield.js
@@ -402,15 +402,17 @@ angular.module('egCoreMod')
                 angular.forEach(list, function (item) {
                     item.children([]); // just clear it out if there's junk in there
 
-                    if (item[parent_field]()) {
-                        item[parent_field]( hash[''+item[parent_field]()] );
-                    }
-
                     item.children( list.filter(function (kid) {
                         return kid[parent_field]() == item[pkey]();
                     }) );
                 });
 
+                angular.forEach(list, function (item) {
+                    if (item[parent_field]()) {
+                        item[parent_field]( hash[''+item[parent_field]()] );
+                    }
+                });
+
                 egCore.env.absorbTree(top, type, true)
                 return $q.when(true)
             });

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

Summary of changes:
 .../web/js/ui/default/staff/services/lovefield.js  |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list