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 <sandbej@linnbenton.edu>
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'));
- }
+ }
}