Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[#10192207] Fix for fines script stalling on deleted items

If an item was checked out and deleted without being checked in,
a null itemnumber in the issues table made the fines script stop
processing without any alerts.  Any entries in the issues table
after the orphaned record did not accrue fines.  This adds a fix
to skip entries with null itemnumbers.
  • Loading branch information...
commit 7e3e167972a10098aa2142e85821e078d8370a14 1 parent 28fbe62
jwt01 authored ctfliblime committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 misc/cronjobs/fines.pl
View
4 misc/cronjobs/fines.pl
@@ -132,6 +132,10 @@ INIT
print STDERR "ERROR in Getoverdues line $i: issues.borrowernumber IS NULL. Repair 'issues' table now! Skipping record.\n";
next; # Note: this doesn't solve everything. After NULL borrowernumber, multiple issues w/ real borrowernumbers can pile up.
}
+ unless (defined $data->[$i]->{'itemnumber'}) {
+ print STDERR "ERROR in Getoverdues line $i: issues.itemnumber IS NULL. Repair 'issues' table now! Skipping record.\n";
+ next; # Note: this doesn't solve everything. After NULL borrowernumber, multiple issues w/ real borrowernumbers can pile up.
+ }
# for legacy data that doesn't set issuingbranch:
$data->[$i]->{issuingbranch} ||= $data->[$i]->{branchcode};
my $borrower = BorType($data->[$i]->{'borrowernumber'});
Please sign in to comment.
Something went wrong with that request. Please try again.