http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14694
--- Comment #14 from Jonathan Druart <[email protected]> --- Comment on attachment 43598 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43598 [SIGNED-OFF] Bug 14694 - Make decreaseloanHighHolds more flexible Review of attachment 43598: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=14694&attachment=43598) ----------------------------------------------------------------- ::: C4/Circulation.pm @@ +1189,5 @@ > + > + # static means just more than a given number of holds on the > record > + > + # If the number of holds is less than the threshold, we can stop > here > + if ( $holds->count() < $decreaseLoanHighHoldsValue ) { Just looking at the code, something smells wrong here. There is a strict comparison here. @@ +1214,5 @@ > + 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 ) { And an inclusive here. ::: Koha/Biblio.pm @@ +41,5 @@ > +or list of Koha::Item objects in list context. > + > +=cut > + > +sub items { Wouldn't be better to use a DBIx::Class relation? Something like bug 14819. ::: installer/data/mysql/sysprefs.sql @@ +103,3 @@ > ('decreaseLoanHighHoldsDuration',NULL,'','Specifies a number of days that a > loan is reduced to when used in conjunction with > decreaseLoanHighHolds','Integer'), > ('decreaseLoanHighHoldsValue',NULL,'','Specifies a threshold for the minimum > number of holds needed to trigger a reduction in loan duration (used with > decreaseLoanHighHolds)','Integer'), > +('decreaseLoanHighHoldsIgnoreStatuses', '', > 'damaged|itemlost|notforloan|withdrawn', "Ignore items with these statuses > for dynamic high holds checking", 'Choice'), Wrongly placed. -- 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/
