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

Evergreen Git git at git.evergreen-ils.org
Fri Nov 10 16:25:31 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  7cfa0b1b87f92c834baf6014d209fc36b6fe3fec (commit)
       via  6508665f0d14c9a51d7929e50a4089084ae63ed1 (commit)
      from  d5a8ecfb05739bcbcf61a12337916df44da98a63 (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 7cfa0b1b87f92c834baf6014d209fc36b6fe3fec
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date:   Fri Nov 10 16:43:29 2017 -0500

    LP#1723498: fix display of count of duplicate patrons
    
    This patch fixes an issue where the patron registration
    form's alert for duplicate phone numbers did not display
    the count of matching records. (This was caused by code
    that was expecting a string to be passed by reference
    when it's passed by value in JavaScript).
    
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.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 ce365ab..f93fbfa 100644
--- a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
+++ b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
@@ -45,19 +45,19 @@
       <a target="_blank" 
         href="/eg/staff/circ/patron/search?search={{dupe_search_encoded.day_phone}}">
         [% l('[_1] patron(s) with same phone', 
-        '{{dupe_counts.phone}}') %]</a>
+        '{{dupe_counts.day_phone}}') %]</a>
     </div>
     <div class="alert alert-danger" ng-show="dupe_counts.evening_phone">
       <a target="_blank" 
         href="/eg/staff/circ/patron/search?search={{dupe_search_encoded.evening_phone}}">
         [% l('[_1] patron(s) with same phone', 
-        '{{dupe_counts.phone}}') %]</a>
+        '{{dupe_counts.evening_phone}}') %]</a>
     </div>
     <div class="alert alert-danger" ng-show="dupe_counts.other_phone">
       <a target="_blank" 
         href="/eg/staff/circ/patron/search?search={{dupe_search_encoded.other_phone}}">
         [% l('[_1] patron(s) with same phone', 
-        '{{dupe_counts.phone}}') %]</a>
+        '{{dupe_counts.other_phone}}') %]</a>
     </div>
     <div class="alert alert-danger" ng-show="dupe_counts.address">
       <a target="_blank" 

commit 6508665f0d14c9a51d7929e50a4089084ae63ed1
Author: Bill Erickson <berickxx at gmail.com>
Date:   Thu Nov 9 10:46:50 2017 -0500

    LP#1723498 Patron reg/edit dupe search repairs
    
    Avoid clobbering duplicate patron search links by managing search URLs
    individually by search type and displaying a search link per search
    type.
    
    This change includes an improvement over the XUL version in that a link
    will be displayed per matching phone number so each can be searched,
    instead of only searching the most recently entered phone number.
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Terra McCanna <tmccanna at georgialibraries.org>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.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 ce8da85..ce365ab 100644
--- a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
+++ b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2
@@ -25,31 +25,43 @@
     [%# 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}}&inactive=1">
+        href="/eg/staff/circ/patron/search?search={{dupe_search_encoded.name}}&inactive=1">
       [% l('[_1] patron(s) with same name', '{{dupe_counts.name}}') %]
       </a>
     </div>
     <div class="alert alert-danger" ng-show="dupe_counts.email">
       <a target="_blank"
-        href="/eg/staff/circ/patron/search?search={{dupe_search_encoded}}">
+        href="/eg/staff/circ/patron/search?search={{dupe_search_encoded.email}}">
         [% l('[_1] patron(s) with same email', 
         '{{dupe_counts.email}}') %]</a>
     </div>
     <div class="alert alert-danger" ng-show="dupe_counts.ident">
       <a target="_blank" 
-        href="/eg/staff/circ/patron/search?search={{dupe_search_encoded}}">
+        href="/eg/staff/circ/patron/search?search={{dupe_search_encoded.ident}}">
         [% l('[_1] patron(s) with same identification', 
         '{{dupe_counts.ident}}') %]</a>
     </div>
-    <div class="alert alert-danger" ng-show="dupe_counts.phone">
+    <div class="alert alert-danger" ng-show="dupe_counts.day_phone">
       <a target="_blank" 
-        href="/eg/staff/circ/patron/search?search={{dupe_search_encoded}}">
+        href="/eg/staff/circ/patron/search?search={{dupe_search_encoded.day_phone}}">
+        [% l('[_1] patron(s) with same phone', 
+        '{{dupe_counts.phone}}') %]</a>
+    </div>
+    <div class="alert alert-danger" ng-show="dupe_counts.evening_phone">
+      <a target="_blank" 
+        href="/eg/staff/circ/patron/search?search={{dupe_search_encoded.evening_phone}}">
+        [% l('[_1] patron(s) with same phone', 
+        '{{dupe_counts.phone}}') %]</a>
+    </div>
+    <div class="alert alert-danger" ng-show="dupe_counts.other_phone">
+      <a target="_blank" 
+        href="/eg/staff/circ/patron/search?search={{dupe_search_encoded.other_phone}}">
         [% l('[_1] patron(s) with same phone', 
         '{{dupe_counts.phone}}') %]</a>
     </div>
     <div class="alert alert-danger" ng-show="dupe_counts.address">
       <a target="_blank" 
-        href="/eg/staff/circ/patron/search?search={{dupe_search_encoded}}" >
+        href="/eg/staff/circ/patron/search?search={{dupe_search_encoded.address}}" >
         [% l('[_1] patron(s) with same address', 
         '{{dupe_counts.address}}') %]</a>
     </div>
diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js b/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js
index adf5c71..b80e307 100644
--- a/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js
+++ b/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js
@@ -553,6 +553,8 @@ angular.module('egCoreMod')
 
         console.log('Dupe search called with "'+ type +'" and value '+ value);
 
+        if (type.match(/phone/)) type = 'phone'; // day_phone, etc.
+
         switch (type) {
 
             case 'name':
@@ -1646,15 +1648,19 @@ function($scope , $routeParams , $q , $uibModal , $window , egCore ,
     }
 
     $scope.dupe_value_changed = function(type, value) {
+        if (!$scope.dupe_search_encoded)
+            $scope.dupe_search_encoded = {};
+
         $scope.dupe_counts[type] = 0;
+
         patronRegSvc.dupe_patron_search($scope.patron, type, value)
         .then(function(res) {
             $scope.dupe_counts[type] = res.count;
             if (res.count) {
-                $scope.dupe_search_encoded = 
+                $scope.dupe_search_encoded[type] = 
                     encodeURIComponent(js2JSON(res.search));
             } else {
-                $scope.dupe_search_encoded = '';
+                $scope.dupe_search_encoded[type] = '';
             }
         });
     }
@@ -1729,7 +1735,7 @@ function($scope , $routeParams , $q , $uibModal , $window , egCore ,
                 }
             case 'evening_phone' : 
             case 'other_phone' : 
-                $scope.dupe_value_changed('phone', value);
+                $scope.dupe_value_changed(field_name, value);
                 break;
 
             case 'ident_value':

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

Summary of changes:
 .../src/templates/staff/circ/patron/t_edit.tt2     |   26 ++++++++++++++-----
 .../web/js/ui/default/staff/circ/patron/regctl.js  |   12 +++++++--
 2 files changed, 28 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list