From 6e7ec4bef9fcdbece1c2ff4758af87765d2ee396 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 22 Mar 2018 12:14:17 -0400 Subject: [PATCH] LP#1728147: correct fleshing of staff hold column This patch fixes the test (ahr.usr is fleshed, but not ahr.requestor) and ensures that the value is cached correctly. Signed-off-by: Galen Charlton Signed-off-by: Kathy Lussier --- Open-ILS/web/js/ui/default/staff/circ/holds/app.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Open-ILS/web/js/ui/default/staff/circ/holds/app.js b/Open-ILS/web/js/ui/default/staff/circ/holds/app.js index 33fc77aa7c..8028da5b71 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/holds/app.js +++ b/Open-ILS/web/js/ui/default/staff/circ/holds/app.js @@ -307,6 +307,11 @@ function($scope , $q , $routeParams , $window , $location , egCore , ).then(null, null, function(hold_info) { egProgressDialog.increment(); + + // check if this is a staff-created hold + // i.e., requestor is not the same as the user + hold_info['_is_staff_hold'] = hold_info.hold.requestor() != hold_info.hold.usr().id(); + var hold_id = hold_info.hold.id(); cached_details[hold_id] = hold_info; var item = details_needed[hold_id]; @@ -316,11 +321,6 @@ function($scope , $q , $routeParams , $window , $location , egCore , angular.forEach(hold_info, function(val, key) { item[key] = val }); - // check if this is a staff-created hold - // i.e requestor's profile != 2 (patron) - - item['_is_staff_hold'] = item.hold.requestor().id() != item.hold.usr().id(); - }); } -- 2.11.0