To test:
0 - Make sure ExpireReservesMaxPickupDelay is set to 'Don't allow'
1 - Place a hold for a patron
2 - Check in at another library to set it in transit
3 - Update expirationdate of hold to be in the past
UPDATE reserves SET expirationdate='1999-12-31'
4 - Run cancel_expired_holds.pl
5 - Hold is not canceled
6 - Apply patch
7 - Run again
8 - Hold is cancelled
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
my $dtf = Koha::Database->new->schema->storage->datetime_parser;
my $params = { expirationdate => { '<', $dtf->format_date($today) } };
- $params->{found} = undef unless $expireWaiting;
+ $params->{found} = [ { '!=', 'W' }, undef ] unless $expireWaiting;
# FIXME To move to Koha::Holds->search_expired (?)
my $holds = Koha::Holds->search( $params );