LP#1755892: ensure profile is fleshed in patron search
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Thu, 15 Mar 2018 21:58:16 +0000 (14:58 -0700)
committerBill Erickson <berickxx@gmail.com>
Wed, 21 Mar 2018 15:12:32 +0000 (11:12 -0400)
To test
-------
[1] Do a catalog search or retrieve a record in the web staff client.
[2] Click Place Hold.
[3] On the place hold screen, click Patron Search.
[4] Search for patrons (e.g. last name = "smith"). In the results grid,
    the Profile column is empty.
[5] Apply the patch and repeat steps 3 and 4. This time, the Profile
    column should contain the profile name.

Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/web/js/ui/default/staff/services/patron_search.js

index 07f73be..f19678f 100644 (file)
@@ -685,6 +685,10 @@ function($scope,  $q,  $routeParams,  $timeout,  $window,  $location,  egCore,
             return $q.when();
         }
 
+        var fleshFields = egUser.defaultFleshFields.slice(0);
+        if (fleshFields.indexOf('profile') == -1)
+            fleshFields.push('profile');
+
         egProgressDialog.open(); // Indeterminate
 
         patronSvc.patrons = [];
@@ -698,7 +702,7 @@ function($scope,  $q,  $routeParams,  $timeout,  $window,  $location,  egCore,
             fullSearch.sort,
             fullSearch.inactive,
             fullSearch.home_ou,
-            egUser.defaultFleshFields,
+            fleshFields,
             fullSearch.offset
 
         ).then(