[Koha-bugs] [Bug 14694] Make decreaseloanHighHolds more flexible

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sun Oct 25 13:01:17 CET 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14694

--- Comment #20 from Kyle M Hall <kyle.m.hall at gmail.com> ---
(In reply to Jonathan Druart from comment #18)
> (In reply to Kyle M Hall from comment #17)
> > > 6 vs 5
> > 
> > That is a purposeful change. The issue was that the logic of the unit test
> > was off by one. The assumption was that the number of holds must greater
> > than or equal to, but as per the code and sys pref definition, the number of
> > holds must be simply greater than. Thus adding one more hold fixes all the
> > tests.
> 
> (In reply to Jonathan Druart from comment #14)
> > > +            if ( $holds->count() <= $threshold ) {
> > 
> > And an inclusive here.
> 
> So should this be < also?

No, that is the correct comparison. If you look at the descritions for the two
high holds behavior options you will see the static ( original ) version
requires a < comparison, and the new dynamic versions needs <=.

> > ::: 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.

No, we want to return a Koha::Object object, not a DBIC object. It would be
most confusing if a Koha::Object method were to return a DBIC object instead of
a Koha Object.

> 
> What about these 2 comments?

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list