[open-ils-commits] [GIT] Evergreen ILS branch rel_3_1 updated. 277f0ebe5bc349c271a82c5c52c87e83841831e8

Evergreen Git git at git.evergreen-ils.org
Wed May 23 15:16:18 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_1 has been updated
       via  277f0ebe5bc349c271a82c5c52c87e83841831e8 (commit)
      from  34ac908c87995beaab2206ea8e21ced20b8a3ead (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 277f0ebe5bc349c271a82c5c52c87e83841831e8
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