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

Evergreen Git git at git.evergreen-ils.org
Wed Sep 7 15:39:31 EDT 2016


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  ee711968b69b8e4a6613f630d975965d28162e27 (commit)
      from  58e107fbe24035e1f4944f2df975ac91126470af (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 ee711968b69b8e4a6613f630d975965d28162e27
Author: Galen Charlton <gmc at esilibrary.com>
Date:   Mon Mar 7 12:42:51 2016 -0500

    LP#1436987: webstaff - fix patron search form
    
    This patch ensures that the patron profile and
    search OU values are retained when going from a patron
    search to a single record and back to the patron search.
    
    To test the fix for this bug:
    
    [1] Search for a patron using the expanded patron search fields,
        making sure to select values for the profile and search
        OU dropdowns.
    [2] Open a record, then click "Patron Search" to return to the
        search form.
    [3] Verify that the profile and search library are set and
        that the same patron records are retrieved.
    
    This patch includes elements from a patch originally written
    by Victoria Lewis <vlewis at catalystitservices.com>
    
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Mike Rylander <mrylander 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 687dd3c..c860364 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
@@ -824,6 +824,11 @@ function($scope,  $q,  $routeParams,  $timeout,  $window,  $location,  egCore,
     var propagate;
     if (patronSvc.lastSearch) {
         propagate = patronSvc.lastSearch.search;
+        // home_ou needs to be treated specially
+        propagate.home_ou = {
+            value : patronSvc.lastSearch.home_ou,
+            group : 0
+        };
     } else if (patronSvc.urlSearch) {
         propagate = patronSvc.urlSearch.search;
     }
@@ -845,7 +850,7 @@ function($scope,  $q,  $routeParams,  $timeout,  $window,  $location,  egCore,
         // populate the search form with our cached / preexisting search info
         angular.forEach(propagate, function(val, key) {
             if (key == 'profile')
-                val.value = $scope.profiles.filter(function(p) { p.id() == val.value })[0];
+                val.value = $scope.profiles.filter(function(p) { return p.id() == val.value })[0];
             if (key == 'home_ou')
                 val.value = egCore.org.get(val.value);
             $scope.searchArgs[key] = val.value;

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

Summary of changes:
 .../web/js/ui/default/staff/circ/patron/app.js     |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list