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

Evergreen Git git at git.evergreen-ils.org
Tue Feb 6 18:10:00 EST 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  c096eb8751dac732c9e57809271cc24f909623ac (commit)
      from  71a8f14cc21566d2e02d1a9dbcaf844200ba396b (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 c096eb8751dac732c9e57809271cc24f909623ac
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date:   Tue Jan 9 16:51:54 2018 -0500

    LP#1724052: move stat-cat cache initialization to patron search service
    
    When the patron search was split out of the patron app per bug 1701001,
    the startup code that copied the current patron stat-cat list into
    egCore.env was not moved over as well and remained in the patron app. As
    a consequence, the patron search-to-hold dialog would fail to display
    any patrons in the results list that had statistical categories assigned.
    This patch moves that bit of initialization into the service.
    
    To test
    -------
    [1] Ensure that some patron records have statistical categories assigned.
    [2] In the web staff client, perform a catalog search, place a hold,
        then use the 'Patron Search' button. Perform a search; note that
        patrons with statistical categories are not displayed and that
        errors are present in the browser debug console.
    [3] Apply the patch and repeat step #2. This time, patrons that have
        stat cats should be included in the results.
    [4] Perform a patron search in the main patron search interface;
        verify that patrons with statistical categories are retrieved.
    [5] Directly go to the page listing stat cats for a patron (e.g.,
        /eg/staff/circ/patron/$ID/stat_cats). Verify that the name
        of the OU that owns the stat cat is displayed.
    
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
    Signed-off-by: Cesar Velez <cesar.velez at equinoxinitiative.org>
    Signed-off-by: Bill Erickson <berickxx at gmail.com>

diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/app.js b/Open-ILS/web/js/ui/default/staff/circ/patron/app.js
index d1573dc..5336cd8 100644
--- a/Open-ILS/web/js/ui/default/staff/circ/patron/app.js
+++ b/Open-ILS/web/js/ui/default/staff/circ/patron/app.js
@@ -61,18 +61,7 @@ angular.module('egPatronApp', ['ngRoute', 'ui.bootstrap', 'egUserBucketMod',
             ]);
         }
 
-        return egCore.startup.go().then(function() {
-
-            // This call requires orgs to be loaded, because it
-            // calls egCore.org.ancestors(), so call it after startup
-            return egCore.pcrud.search('actsc', 
-                {owner : egCore.org.ancestors(
-                    egCore.auth.user().ws_ou(), true)},
-                {}, {atomic : true}
-            ).then(function(cats) {
-                egCore.env.absorbList(cats, 'actsc');
-            });
-        });
+        return egCore.startup.go();
     }]};
 
     $routeProvider.when('/circ/patron/search', {
diff --git a/Open-ILS/web/js/ui/default/staff/services/patron_search.js b/Open-ILS/web/js/ui/default/staff/services/patron_search.js
index 758681a..07f73be 100644
--- a/Open-ILS/web/js/ui/default/staff/services/patron_search.js
+++ b/Open-ILS/web/js/ui/default/staff/services/patron_search.js
@@ -48,15 +48,25 @@ function($q , $timeout , $location , egCore,  egUser , egConfirmDialog , $locale
     }
     service.resetPatronLists();  // initialize
 
-    // Max recents setting is loaded and scrubbed during egStartup.
-    // Copy it to a local variable here for ease of local access
-    // after startup has run.
     egCore.startup.go().then(
         function() {
+            // Max recents setting is loaded and scrubbed during egStartup.
+            // Copy it to a local variable here for ease of local access
+            // after startup has run.
             egCore.org.settings('ui.staff.max_recent_patrons')
             .then(function(s) {
                 service.maxRecentPatrons = s['ui.staff.max_recent_patrons'];
             });
+
+            // This call requires orgs to be loaded, because it
+            // calls egCore.org.ancestors(), so call it after startup
+            egCore.pcrud.search('actsc',
+                {owner : egCore.org.ancestors(
+                    egCore.auth.user().ws_ou(), true)},
+                {}, {atomic : true}
+            ).then(function(cats) {
+                egCore.env.absorbList(cats, 'actsc');
+            });
         }
     );
 

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

Summary of changes:
 .../web/js/ui/default/staff/circ/patron/app.js     |   13 +------------
 .../js/ui/default/staff/services/patron_search.js  |   16 +++++++++++++---
 2 files changed, 14 insertions(+), 15 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list