https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22005
--- Comment #4 from Magnus Enger <[email protected]> --- I really don't understand the logic of the CheckHighHolds sub: sub checkHighHolds { my ( $item, $borrower ) = @_; ... if ( $holds->count() ) { ... if ( $decreaseLoanHighHoldsControl eq 'static' ) { ... # If the number of holds is less than the threshold, we can stop here if ( $holds->count() < $decreaseLoanHighHoldsValue ) { return $return_data; } } elsif ( $decreaseLoanHighHoldsControl eq 'dynamic' ) { ... # 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; } } ... if ( DateTime->compare( $reduced_datedue, $orig_due ) == -1 ) { $return_data->{exceeded} = 1; $return_data->{duration} = $decreaseLoanHighHoldsDuration; $return_data->{due_date} = $reduced_datedue; } } return $return_data; } As far as I can tell, it does the right thing for decreaseLoanHighHoldsControl = static/dynamic, but then it goes and calculates the regular/original due date and the decreased due date, and if the decreased date is less than the original date, then the decreased date is returned? Why is this done? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug. _______________________________________________ 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/
