[Bug 44281] New: An overdue recall stops all fines on a record when the rule has no recall overdue fine, and charges the recall fine to items that were not recalled
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44281 Bug ID: 44281 Summary: An overdue recall stops all fines on a record when the rule has no recall overdue fine, and charges the recall fine to items that were not recalled Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Fines and fees Assignee: koha-bugs@lists.koha-community.org Reporter: babarjunaid1122@gmail.com QA Contact: testopia@bugs.koha-community.org Target Milestone: --- CalcFine (C4/Overdues.pm) looks for overdue recalls on the item's record, and only charges the normal fine when there are none: if ( scalar @recalls == 0 && $issuing_rule->{fine} ) { ... normal fine ... } Two things go wrong: 1. If the record has an overdue recall but the circulation rule has no "Recall overdue fine amount", no branch sets the amount, so every overdue loan of every item on that record is charged 0 for as long as the recall stays overdue. 2. An item-level recall only resets the "biblio-level recall" flag when it is for this item. An item-level recall on another item of the same record leaves the flag set, so the borrower of an item nobody recalled is charged the recall overdue fine. To reproduce, with the rules in t/db_dependent/Circulation/CalcFine.t (fine 1.00, charge period 1 day, recall overdue fine 5.00) and a loan 5 days overdue: - an overdue item-level recall on item B: CalcFine for item A gives 25 (recall rate) instead of 5; - the same with the recall overdue fine amount left empty: CalcFine for the recalled item gives 0 instead of 5. Expected: the recall overdue fine applies only to the item that was recalled (item-level) or to the record's loans (biblio-level recall), and when there is no recall overdue fine amount the normal fine is charged. Bug 37942 is about a different part of the same code (the recall fine replacing the whole earlier fine); this one is about which loans the recall rate applies to, and the missing fallback. Reproduced on main (c8e8025). -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44281 babar junaid <babarjunaid1122@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=37942 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44281 --- Comment #1 from babar junaid <babarjunaid1122@gmail.com> --- Created attachment 212592 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212592&action=edit Bug 44281: Apply the recall overdue fine only to the recalled item, else the normal fine Bug 44281: Apply the recall overdue fine only to the recalled item, else the normal fine CalcFine charged the normal fine only when the record had no overdue recall at all. So: - with no "Recall overdue fine amount" in the rule, an overdue recall on the record made every overdue loan of that record cost 0; - an item-level recall on another item of the record left the "biblio-level recall" flag set, so an item nobody recalled was charged the recall overdue fine. Now the recall overdue fine is charged when the rule has one and the record has an overdue biblio-level recall, or an overdue item-level recall for this item. Otherwise the normal fine is charged. Test plan: 1. prove t/db_dependent/Circulation/CalcFine.t Without the patch the new subtest fails: 25 instead of 5 for the item that was not recalled, 0 instead of 5 with no recall fine amount. With the patch it passes. 2. prove t/db_dependent/Overdues.t t/db_dependent/Koha/Recalls.t t/db_dependent/Koha/Recall.t Sponsored-by: Koha Solutions -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44281 babar junaid <babarjunaid1122@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |babarjunaid1122@gmail.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org