/
);
+__PACKAGE__->register_method(
+ method => 'fetch_captured_holds',
+ api_name =>
+ 'open-ils.circ.captured_holds.expired_on_shelf_or_wrong_shelf.retrieve',
+ stream => 1,
+ authoritative => 1,
+ signature => q/
+ Returns list of shelf-expired un-fulfilled holds OR wrong shelf holds
+ for a given shelf lib
+ /
+);
+
+__PACKAGE__->register_method(
+ method => 'fetch_captured_holds',
+ api_name =>
+ 'open-ils.circ.captured_holds.id_list.expired_on_shelf_or_wrong_shelf.retrieve',
+ stream => 1,
+ authoritative => 1,
+ signature => q/
+ Returns list of shelf-expired un-fulfilled holds OR wrong shelf holds
+ for a given shelf lib
+ /
+);
+
sub fetch_captured_holds {
my( $self, $conn, $auth, $org, $match_copy ) = @_;
}
my $hold_ids = $e->json_query( $query );
+ if ($self->api_name =~ /wrong_shelf/) {
+ # fetch holds whose current_shelf_lib is $org, but whose pickup
+ # lib is some other org unit. Ignore already-retrieved holds.
+ my $wrong_shelf =
+ pickup_lib_changed_on_shelf_holds(
+ $e, $org, [map {$_->{id}} @$hold_ids]);
+ # match the layout of other items in $hold_ids
+ push (@$hold_ids, {id => $_}) for @$wrong_shelf;
+ }
+
+
for my $hold_id (@$hold_ids) {
if($self->api_name =~ /id_list/) {
$conn->respond($hold_id->{id});
'HTML_HOLD_PULL_LIST' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.hold_pull_list.print' },
'FM_AHR_ONSHELF_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.captured_holds.on_shelf.retrieve' },
'FM_AHR_ID_LIST_ONSHELF_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.captured_holds.id_list.on_shelf.retrieve.authoritative', 'secure' : false },
- 'FM_AHR_ID_LIST_EXPIRED_ONSHELF_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.captured_holds.id_list.expired_on_shelf.retrieve.authoritative', 'secure' : false },
+ 'FM_AHR_ID_LIST_EXPIRED_ONSHELF_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.captured_holds.id_list.expired_on_shelf_or_wrong_shelf.retrieve', 'secure' : false },
'FM_AHR_COUNT_FOR_BRE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.bre.holds.count', 'secure' : false },
'FM_AHR_COUNT_RETRIEVE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.hold_requests.count', 'cacheable' : true, 'ttl' : 60000 },
'FM_AHR_COUNT_RETRIEVE.authoritative' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.hold_requests.count.authoritative', 'cacheable' : true, 'ttl' : 60000 },