[Koha-bugs] [Bug 19014] Patrons should not get a on_reserve notification if the due date is far into the future

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Nov 21 01:26:36 CET 2018


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

David Cook <dcook at prosentient.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dcook at prosentient.com.au

--- Comment #14 from David Cook <dcook at prosentient.com.au> ---
I've run into this same problem, but my thinking was that
C4::Circulation::CanBookBeRenewed() should check for "too_soon" before
"on_reserve".

In fact, shouldn't reserves be the last thing checked when determining whether
or not a book can be renewed?

Here's the scenario I see:

1. Patron A autorenews Book A on Wednesday morning
2. Patron B reserves Book A on Wednesday afternoon
3. Patron A receives autorenewal failure for Book A on Thursday morning

Here's some SQL I've used to find instances of that scenario happening (the
search strings will depend on the content of your notices):

select
m.borrowernumber,
m.message_id, mq.message_id, m.time_queued, mq.time_queued,m.content,
mq.content
from message_queue m
join message_queue mq ON
m.borrowernumber = mq.borrowernumber
AND substring(m.content,locate('The following item',m.content),30) =
substring(mq.content,locate('The following item',mq.content),30)
AND date(date_add(m.time_queued, INTERVAL 1 DAY)) = date(mq.time_queued)
where m.letter_code = 'AUTO_RENEWALS'
and mq.content like '%item is on hold%'
ORDER BY m.borrowernumber

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list