From: Bill Erickson Date: Thu, 28 Jul 2016 21:04:05 +0000 (-0400) Subject: LP#1497335 Browser client item details aged circs X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0a7b9c9184a1f3cc55e2d452df1ac08ad404dd7f;p=working%2FEvergreen.git LP#1497335 Browser client item details aged circs 1. Use all_circulation (combcirc) class (now accessible via pcrud) to render the item Circ History List tab. In cases where a combcirc object has no 'usr' value, the interface displays where the patron's name would normally be. 2. Handle null 'usr' values in the item status Recent Circ History tab. When a renewal chain summary has no 'usr' value, the interface displays where the patron's name would normally be. Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index d036b3d335..f36c755a95 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -4116,7 +4116,7 @@ SELECT usr, - + @@ -4199,6 +4199,11 @@ SELECT usr, + + + + + diff --git a/Open-ILS/src/templates/staff/cat/item/t_circ_list_pane.tt2 b/Open-ILS/src/templates/staff/cat/item/t_circ_list_pane.tt2 index 05ee925df1..c6d81b5cab 100644 --- a/Open-ILS/src/templates/staff/cat/item/t_circ_list_pane.tt2 +++ b/Open-ILS/src/templates/staff/cat/item/t_circ_list_pane.tt2 @@ -17,13 +17,15 @@
diff --git a/Open-ILS/src/templates/staff/cat/item/t_circs_pane.tt2 b/Open-ILS/src/templates/staff/cat/item/t_circs_pane.tt2 index 24a3241537..512f5c3890 100644 --- a/Open-ILS/src/templates/staff/cat/item/t_circs_pane.tt2 +++ b/Open-ILS/src/templates/staff/cat/item/t_circs_pane.tt2 @@ -14,13 +14,16 @@
[% l('Patron') %]
diff --git a/Open-ILS/web/js/ui/default/staff/cat/item/app.js b/Open-ILS/web/js/ui/default/staff/cat/item/app.js index a8781dc9be..78a555bcec 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/item/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/item/app.js @@ -902,6 +902,7 @@ function($scope , $q , $location , $routeParams , $timeout , $window , egCore , delete $scope.circ; delete $scope.circ_summary; delete $scope.prev_circ_summary; + delete $scope.prev_circ_usr; if (!copyId) return; egCore.pcrud.search('circ', @@ -945,12 +946,12 @@ function($scope , $q , $location , $routeParams , $timeout , $window , egCore , ).then(null, null, function(summary) { $scope.prev_circ_summary = summary.summary; - egCore.pcrud.retrieve('au', summary.usr, - {flesh : 1, flesh_fields : {au : ['card']}}) + if (summary.usr) { // aged circs have no 'usr'. + egCore.pcrud.retrieve('au', summary.usr, + {flesh : 1, flesh_fields : {au : ['card']}}) - .then(function(user) { - $scope.prev_circ_usr = user; - }); + .then(function(user) { $scope.prev_circ_usr = user }); + } }); }); } @@ -976,7 +977,8 @@ function($scope , $q , $location , $routeParams , $timeout , $window , egCore , $scope.retrieveAllPatrons = function() { var users = new Set(); angular.forEach($scope.circ_list.map(function(circ) { return circ.usr(); }),function(usr) { - users.add(usr); + // aged circs have no 'usr'. + if (usr) users.add(usr); }); users.forEach(function(usr) { $timeout(function() { @@ -1010,11 +1012,11 @@ function($scope , $q , $location , $routeParams , $timeout , $window , egCore , }).then(function(count) { - egCore.pcrud.search('circ', + egCore.pcrud.search('combcirc', {target_copy : copyId}, { flesh : 2, flesh_fields : { - circ : [ + combcirc : [ 'usr', 'workstation', 'checkin_workstation', @@ -1022,7 +1024,7 @@ function($scope , $q , $location , $routeParams , $timeout , $window , egCore , ], au : ['card'] }, - order_by : {circ : 'xact_start desc'}, + order_by : {combcirc : 'xact_start desc'}, limit : count }