From: Jane Sandberg Date: Tue, 22 May 2018 01:37:21 +0000 (-0700) Subject: LP1537228: Display precat alert on every checkin X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=98b8a34f904abfe8582266f15c87dad7d0b2f311;p=working%2FEvergreen.git LP1537228: Display precat alert on every checkin To test: 1) Create a precat item. 2) Check it in twice in the Web client. Confirm that the alert only appears the first time. 3) Apply this commit. 4) Repeat steps 1-2. The alert should appear every time you check in the item. Signed-off-by: Jane Sandberg --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm index c2d55186cf..3f67dd1799 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm @@ -3077,14 +3077,16 @@ sub checkin_check_holds_shelf { sub checkin_handle_precat { my $self = shift; - my $copy = $self->copy; + my $copy = $self->copy; - if( $self->is_precat and ($copy->status != OILS_COPY_STATUS_CATALOGING) ) { - $copy->status(OILS_COPY_STATUS_CATALOGING); - $self->update_copy(); - $self->checkin_changed(1); + if( $self->is_precat ) { + if( $copy->status != OILS_COPY_STATUS_CATALOGING ) { + $copy->status(OILS_COPY_STATUS_CATALOGING); + $self->update_copy(); + $self->checkin_changed(1); + } $self->push_events(OpenILS::Event->new('ITEM_NOT_CATALOGED')); - } + } }