<field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
<field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
<field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
+ <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
<field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
<field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
<field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
if( $self->copy ) {
$self->transit(
$self->editor->search_action_transit_copy(
- { target_copy => $self->copy->id, dest_recv_time => undef })->[0]);
+ { target_copy => $self->copy->id, dest_recv_time => undef }
+ )->[0]
+ );
}
if( $self->circ ) {
$U->copy_status($self->copy->status)->id
== OILS_COPY_STATUS_ON_HOLDS_SHELF ) {
- my $hold;
- if( $hold_transit ) {
- $hold = $self->editor->retrieve_action_hold_request($hold_transit->hold);
- } else {
- ($hold) = $U->fetch_open_hold_by_copy($self->copy->id);
- }
+ my $hold;
+ if( $hold_transit ) {
+ $hold = $self->editor->retrieve_action_hold_request($hold_transit->hold);
+ } else {
+ ($hold) = $U->fetch_open_hold_by_copy($self->copy->id);
+ }
$self->hold($hold);
# this copy can fulfill a hold or needs to be routed to a different location
# ------------------------------------------------------------------------------
- unless($self->noop) { # no-op checkins to not capture holds or put items into transit
+ if(!$self->noop) { # /not/ a no-op checkin, not capture for hold or put item into transit
my $needed_for_hold = (!$self->remote_hold and $self->attempt_checkin_hold_capture());
return if $self->bail_out;
$logger->debug("circulator: circlib=$circ_lib, workstation=".$self->editor->requestor->ws_ou);
if( $circ_lib == $self->editor->requestor->ws_ou ) {
+ # copy is where it needs to be, either for hold or reshelving
$self->checkin_handle_precat();
return if $self->bail_out;
} else {
+ # copy needs to transit "home", or stick here if it's a floating copy
- my $bc = $self->copy->barcode;
- $logger->info("circulator: copy $bc at the wrong location, sending to $circ_lib");
- $self->checkin_build_copy_transit($circ_lib);
- return if $self->bail_out;
- $self->push_events(OpenILS::Event->new('ROUTE_ITEM', org => $circ_lib));
+ if ($U->is_true( $self->copy->floating ) && !$self->remote_hold) { # copy is floating, stick here
+ $self->checkin_changed(1);
+ $self->copy->circ_lib( $self->editor->requestor->ws_ou );
+ $self->update_copy;
+ } else {
+ my $bc = $self->copy->barcode;
+ $logger->info("circulator: copy $bc at the wrong location, sending to $circ_lib");
+ $self->checkin_build_copy_transit($circ_lib);
+ return if $self->bail_out;
+ $self->push_events(OpenILS::Event->new('ROUTE_ITEM', org => $circ_lib));
+ }
}
}
+ } else { # no-op checkin
+ if ($U->is_true( $self->copy->floating )) { # XXX floating items still stick where they are even with no-op checkin?
+ $self->checkin_changed(1);
+ $self->copy->circ_lib( $self->editor->requestor->ws_ou );
+ $self->update_copy;
+ }
}
if($self->claims_never_checked_out and