https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16201

Katrin Fischer <katrin.fisc...@bsz-bw.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Tie automatic cancellation  |Tie automatic cancellation
                   |of expired holds to a       |of expired non-waiting
                   |system preference           |holds to a system
                   |                            |preference

--- Comment #3 from Katrin Fischer <katrin.fisc...@bsz-bw.de> ---
Hi Lisette, thanks for looking into this! 

I had to dig a little deeper to figure out what I was thinking about here in
2016:

The ExpireReservesMaxPickUpDelay seems to only be used for waiting holds, but
it will still expire other "expired" holds that are not waiting yet, if I read
the code correctly.


sub CancelExpiredReserves {
    my $cancellation_reason = shift;
    my $today = dt_from_string();
    my $cancel_on_holidays =
C4::Context->preference('ExpireReservesOnHolidays');
    my $expireWaiting =
C4::Context->preference('ExpireReservesMaxPickUpDelay');

    my $dtf = Koha::Database->new->schema->storage->datetime_parser;
    my $params = {
        -or => [
            { expirationdate => { '<', $dtf->format_date($today) } },
            { patron_expiration_date => { '<' => $dtf->format_date($today) } }
        ]
    };

    $params->{found} = [ { '!=', 'W' }, undef ]  unless $expireWaiting;

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to