[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
Tue Dec 11 15:13:28 CET 2018


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

Holger Meißner <h.meissner.82 at web.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |h.meissner.82 at web.de

--- Comment #17 from Holger Meißner <h.meissner.82 at web.de> ---
(In reply to David Cook from comment #15)
> I think the proper solution might be to refactor
> C4::Circulation::CanBookBeRenewed and then maybe make a separate function
> C4::Circulation::CanBookBeAutoRenewed and make that configurable, since it
> seems that different libraries have different needs/wants for autorenewal.

That's also the first idea I had. Yet, there would be duplicate code and we
shouldn't do that unless we have to.

Second idea: Don't prioritize errors in CanBookBeRenewed.
We already combine different errors in $error, e.g. if both "too_soon" and
"auto_renew" apply, then it's "auto_too_soon". Take this one step further and
return a complete list of basic errors instead. That list could be evaluated as
needed, e.g. the cronjob could decide not to send a notice, because it's too
soon and at the same time opac could decide to display a hold.
I don't know whether the loss in performance would be noticable.

Third idea: Tell CanBookBeRenewed the context we're in.
Give CanBookBeRenewed an additional parameter, so it can return different
errors depending on that parameter, e.g. CanBookBeRenewed(123,123,0,X) where X
might be something like "auto", "staff" or "opac".
Similar to the first idea, but the code stays in one function.

Any other ideas?

Maybe I'll find time to code in 2019, but I can't promise yet.

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


More information about the Koha-bugs mailing list