https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19014
Holger Meißner <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #17 from Holger Meißner <[email protected]> --- (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. _______________________________________________ Koha-bugs mailing list [email protected] http://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/
