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

Evergreen Git git at git.evergreen-ils.org
Sun Mar 5 21:36:48 EST 2017


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  5134f0cfcdc97a210250d92a0e9c3593314eda9a (commit)
       via  74e6b98e2ffb046e428d4ae9cc7b9248c2452ed5 (commit)
       via  f0ec9c21321d74950c8f3396036f249c7579c738 (commit)
      from  6e6f59b5f89a2aa6ee342a8005ec6b5411a1dc1d (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 5134f0cfcdc97a210250d92a0e9c3593314eda9a
Author: Bill Erickson <berickxx at gmail.com>
Date:   Mon Feb 27 12:32:45 2017 -0500

    LP#1576435 Inactive patron search propagation rapair
    
    Fix a small code thinko in the propagation of the 'inactive' flag
    for patron-editor duplicate patron searches.
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

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 28038a0..c00d5a5 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
@@ -897,7 +897,7 @@ function($scope,  $q,  $routeParams,  $timeout,  $window,  $location,  egCore,
             $scope.searchArgs[key] = val.value;
         });
         if (propagate_inactive) {
-            $scope.searchArgs[inactive] = propagate_inactive;
+            $scope.searchArgs.inactive = propagate_inactive;
         }
     }
 

commit 74e6b98e2ffb046e428d4ae9cc7b9248c2452ed5
Author: Jeff Davis <jdavis at sitka.bclibraries.ca>
Date:   Fri May 27 13:10:29 2016 -0700

    LP#1576435: Include inactive patrons on patron reg duplicate search in web client
    
    Signed-off-by: Jeff Davis <jdavis at sitka.bclibraries.ca>
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
index b7516dc..69da8b6 100644
--- a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
+++ b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
@@ -25,7 +25,7 @@
     [%# dupe_search_encoded is uri escaped in the JS %]
     <div class="alert alert-danger" ng-show="dupe_counts.name">
       <a target="_blank"
-        href="/eg/staff/circ/patron/search?search={{dupe_search_encoded}}">
+        href="/eg/staff/circ/patron/search?search={{dupe_search_encoded}}&inactive=1">
       [% l('[_1] patron(s) with same name', '{{dupe_counts.name}}') %]
       </a>
     </div>
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 e075c4f..28038a0 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
@@ -851,9 +851,15 @@ function($scope,  $q,  $routeParams,  $timeout,  $window,  $location,  egCore,
             patronSvc.urlSearch.sort = [];
         }
         delete patronSvc.urlSearch.search.search_sort;
+
+        // include inactive patrons if "inactive" param
+        if ($location.search().inactive) {
+            patronSvc.urlSearch.inactive = $location.search().inactive;
+        }
     }
 
     var propagate;
+    var propagate_inactive;
     if (patronSvc.lastSearch) {
         propagate = patronSvc.lastSearch.search;
         // home_ou needs to be treated specially
@@ -863,6 +869,9 @@ function($scope,  $q,  $routeParams,  $timeout,  $window,  $location,  egCore,
         };
     } else if (patronSvc.urlSearch) {
         propagate = patronSvc.urlSearch.search;
+        if (patronSvc.urlSearch.inactive) {
+            propagate_inactive = patronSvc.urlSearch.inactive;
+        }
     }
 
     if (egCore.env.pgt) {
@@ -887,6 +896,9 @@ function($scope,  $q,  $routeParams,  $timeout,  $window,  $location,  egCore,
                 val.value = egCore.org.get(val.value);
             $scope.searchArgs[key] = val.value;
         });
+        if (propagate_inactive) {
+            $scope.searchArgs[inactive] = propagate_inactive;
+        }
     }
 
     var provider = egGridDataProvider.instance({});

commit f0ec9c21321d74950c8f3396036f249c7579c738
Author: Jeff Davis <jdavis at sitka.bclibraries.ca>
Date:   Sat Apr 23 19:12:27 2016 -0700

    LP#1576435: Force "Include inactive patrons?" on patron reg duplicate search
    
    In the XUL client, duplicate patron checking in the patron registration
    interface now includes inactive patrons (see LP#1217052).  However, if
    you click on the link "Found X patron(s) with the same name," the
    resulting patron search does not always include inactive patrons by
    default (instead, the value of the "Include inactive patrons?" checkbox
    is cached from your last patron search, as usual).
    
    To prevent user confusion in this scenario, this commit forces the
    linked patron search in the XUL client to always include inactive
    patrons.
    
    Signed-off-by: Jeff Davis <jdavis at sitka.bclibraries.ca>
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/web/js/ui/default/actor/user/register.js b/Open-ILS/web/js/ui/default/actor/user/register.js
index 4ce861e..8658667 100644
--- a/Open-ILS/web/js/ui/default/actor/user/register.js
+++ b/Open-ILS/web/js/ui/default/actor/user/register.js
@@ -1887,6 +1887,7 @@ function uEditDupeSearch(type, value) {
                     openils.Util.show(link);
                     link.onclick = function() {
                         search.search_sort = js2JSON(["penalties", "family_name", "first_given_name"]);
+                        search.include_inactive = "true";
                         if(window.xulG)
                             window.xulG.spawn_search(search);
                         else
diff --git a/Open-ILS/xul/staff_client/server/patron/search_form.js b/Open-ILS/xul/staff_client/server/patron/search_form.js
index e62efa0..000e700 100644
--- a/Open-ILS/xul/staff_client/server/patron/search_form.js
+++ b/Open-ILS/xul/staff_client/server/patron/search_form.js
@@ -23,6 +23,8 @@ patron.search_form.prototype = {
                             null :
                             JSON2js( params.query.search_sort ); // Let's assume this is encoded as JSON
 
+        obj.include_inactive = (typeof params.query.include_inactive !== 'undefined') ? params.query.include_inactive : null;
+
         JSAN.use('OpenILS.data'); this.OpenILS = {}; 
         obj.OpenILS.data = new OpenILS.data(); obj.OpenILS.data.init({'via':'stash'});
 
@@ -295,12 +297,16 @@ patron.search_form.prototype = {
 
         var cb = obj.controller.view.inactive;
         obj.event_listeners.add(cb, 'command',function() {
+                obj.include_inactive = null;
                 cb.setAttribute('value',cb.checked ? "true" : "false");
                 var file = new util.file('patron_search_prefs.'+obj.OpenILS.data.server_unadorned);
                 util.widgets.save_attributes(file, { 'search_depth_ml' : [ 'value' ], 'inactive' : [ 'value' ] });
             }, false
         );
-        cb.checked = cb.getAttribute('value') == "true" ? true : false;
+        if (obj.include_inactive !== null)
+            cb.checked = obj.include_inactive == "true" ? true : false;
+        else
+            cb.checked = cb.getAttribute('value') == "true" ? true : false;
 
         /* Populate the Patron Profile filter, if it exists */
         if (obj.controller.view.profile) {
@@ -355,6 +361,9 @@ patron.search_form.prototype = {
             if (node && node.value != '') {
                 if (id == 'inactive') {
                     query[id] = node.getAttribute('value');
+                    // always include inactive when include_inactive is true
+                    if (obj.include_inactive !== null)
+                        query[id] = obj.include_inactive;
                     obj.error.sdump('D_DEBUG','id = ' + id + '  value = ' + node.getAttribute('value') + '\n');
                 } else if (id == 'profile') {
                     query[id] = node.firstChild.getAttribute('value');

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

Summary of changes:
 .../src/templates/staff/circ/patron/t_edit.tt2     |    2 +-
 Open-ILS/web/js/ui/default/actor/user/register.js  |    1 +
 .../web/js/ui/default/staff/circ/patron/app.js     |   12 ++++++++++++
 .../xul/staff_client/server/patron/search_form.js  |   11 ++++++++++-
 4 files changed, 24 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list