From: Jason Stephenson Date: Sun, 8 Jul 2018 15:13:40 +0000 (-0400) Subject: Try checkin before marking item discard/weed. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=050f28c4cef931523a2dd25b9a9bd986a2970386;p=working%2FEvergreen.git Try checkin before marking item discard/weed. 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. --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm index bad3be3819..c4be222b2e 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ.pm @@ -1307,9 +1307,9 @@ sub mark_item { 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);