https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34902
Magnus Enger <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from Magnus Enger <[email protected]> --- The description of the relevant syspres says: [Enable] the reduction of loan period to [7] days for high demand items with more than [1] holds [over the number of holdable items on the record]. So we should reduce the loan period for items with *more than* [1] holds over the number of holdable items. The scenario is that a patron is in the library to pick up a book that has been on hold for them, and we need to consider the holds that are left, after this patron checks out their loan. Should the loan period of this loan be made shorter, or not? So if there is - 1 holdable item and 1 remaining hold, we should not reduce the loan period (this is *equal to* the number of holdable items + 1, but not *more than*) - 1 holdable item and 2 remaining holds, we should reduce the loan period (because this is *more than* the limit we have set) But the code looks like this now: my $threshold = $items_count + $decreaseLoanHighHoldsValue; # If the number of holds is less than the count of items we have # plus the number of holds allowed above that count, we can stop here if ( $holds->count() <= $threshold ) { return $return_data; } So with 1 item and decreaseLoanHighHoldsValue = 1 we get a $threshold of 2. But this is then compared with a "more than or equal" to the number of remaining holds, meaning that both with 1 and 2 remaining holds, the loan period is not shortened. But it should be shortened when there are two remaining holds. So the comparison should be "more than", not "more than or equal". Patch coming. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://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/
