Modify Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm to call
try_checkin in mark_item when the api includes discard under the same
conditions as when marking an item damaged.
my( $self, $conn, $auth, $copy_id, $args ) = @_;
$args ||= {};
- # Items must be checked in before any attempt is made to mark damaged
+ # Items must be checked in before any attempt is made to mark damaged or discard
my $evt = try_checkin($auth, $copy_id) if
- ($self->api_name=~ /damaged/ && $args->{handle_checkin});
+ ($self->api_name=~ /(?:damaged|discard)/ && $args->{handle_checkin});
return $evt if $evt;
my $e = new_editor(authtoken=>$auth, xact =>1);