diff --git a/misc/cronjobs/holds/holds_reminder.pl b/misc/cronjobs/holds/holds_reminder.pl index d1f49287ca..96290c00ad 100755 --- a/misc/cronjobs/holds/holds_reminder.pl +++ b/misc/cronjobs/holds/holds_reminder.pl @@ -260,6 +260,7 @@ foreach my $branchcode (@branchcodes) { #BEGIN BRANCH LOOP my $reserves = Koha::Holds->search({ waitingdate => {$comparator => $waiting_since }, 'me.branchcode' => $branchcode, + '-or' => [ expirationdate => undef, expirationdate => { '>' => \'CURDATE()' } ] },{ prefetch => 'patron' }); $verbose and warn "No reserves found for $branchcode\n" unless $reserves->count;