From: Bill Erickson Date: Tue, 22 Mar 2016 20:20:51 +0000 (-0400) Subject: LP#1497335 Aged circs display / API / WIP X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=184567167a2dca37fa2f166e01a446bed8c87012;p=working%2FEvergreen.git LP#1497335 Aged circs display / API / WIP Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 7bca4f21ec..66e7d871da 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -4161,6 +4161,8 @@ SELECT usr, + + @@ -4187,6 +4189,8 @@ SELECT usr, + + diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm index 3e438ce69c..7b22f0ec03 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm @@ -1074,17 +1074,28 @@ sub copy_details { { target_copy => $copy_id, dest_recv_time => undef } )->[0]; # find the latest circ, open or closed - my $circ = $e->search_action_circulation( + my $circ = $e->search_action_all_circulation( [ { target_copy => $copy_id }, { - flesh => 1, + flesh => 2, flesh_fields => { + combcirc => [ + 'active_circ', + 'aged_circ' + ], circ => [ 'workstation', - 'checkin_workstation', - 'duration_rule', - 'max_fine_rule', + 'checkin_workstation', + 'duration_rule', + 'max_fine_rule', + 'recurring_fine_rule' + ], + acirc => [ + 'workstation', + 'checkin_workstation', + 'duration_rule', + 'max_fine_rule', 'recurring_fine_rule' ] }, @@ -1094,6 +1105,9 @@ sub copy_details { ] )->[0]; + if ($circ) { + $circ = $circ->active_circ ? $circ->active_circ : $circ->aged_circ; + } return { copy => $copy,