[open-ils-commits] [GIT] Evergreen ILS branch rel_3_0 updated. 2545bc37ac0e6ee1cc3bbf4e7632de6400ad29c8

Evergreen Git git at git.evergreen-ils.org
Wed May 23 15:16:26 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, rel_3_0 has been updated
       via  2545bc37ac0e6ee1cc3bbf4e7632de6400ad29c8 (commit)
      from  02d3d6c7c2bb797102feefe0ac4b2c781ea43210 (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 2545bc37ac0e6ee1cc3bbf4e7632de6400ad29c8
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 dfebc4b..d930199 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