diff --git a/misc/cronjobs/holds/holds_reminder.pl b/misc/cronjobs/holds/holds_reminder.pl index 76b4f81a2b..9824fe39c9 100755 --- a/misc/cronjobs/holds/holds_reminder.pl +++ b/misc/cronjobs/holds/holds_reminder.pl @@ -256,6 +256,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;