[Koha-bugs] [Bug 19298] allow_onshelf_holds is not calculated correctly in opac-shelves

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Oct 20 18:24:20 CEST 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19298

--- Comment #5 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
(In reply to Marcel de Rooy from comment #4)
> We will be doing this a lot of times when a biblio has more items:
> 
> my $issuing_rule = Koha::IssuingRules->get_effective_issuing_rule({
> categorycode => $borrowercategory, itemtype => $itype, branchcode =>
> $branchcode });
> 
> The categorycode is always the same. Branchcode is holding branch, often
> too. And probably we will not have a lot of different itemtypes for one
> biblio. So this could be more intelligent.
> For longer lists with biblios having much items (serials), we are not
> improving performance.

The calculation was wrong, this patch suggests to fix it (calculate it as it is
everywhere else).
The performance point is valid, but is outside the scope of this bug report.
See as the related bug to understand where I am going (move to Koha namespace,
then improve code from there. We can easily imagine a cache mechanism in
Koha::IssuingRules). 

> And another thing:
> We are using OnShelfHoldsAllowed on detail forms but NOT on search results
> with 20 biblios. Why should we use it on a list that may contain much more
> biblios?
> I would rather set $this_item->{allow_onshelf_holds} to 1 and let
> opac-reserve handle the details, similar to opac-search. The template
> already contains itemsloo.norequests and also tests itemsloo.itemsissued..

I guess that could be considered as a regression by somebody else.

Again, this is a bug I found where I started moving code. I would like to
improve the way it is calculated/displayed, etc (see bug 19297).
But this patch is the very first step :)

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


More information about the Koha-bugs mailing list