Summary: | Tie automatic cancellation of expired non-waiting holds to a system preference | ||
---|---|---|---|
Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
Component: | Hold requests | Assignee: | Bugs List <koha-bugs> |
Status: | NEW --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | gmcharlt, lisette |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: |
Description
Katrin Fischer
2016-04-05 09:50:00 UTC
This would still be nice to have :) Doesn't ExpireReservesMaxPickUpDelay do this? Or does that not matter if the cron is running? 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; |