[Koha-bugs] [Bug 25193] Add syspref to control location for use of AllowRenewalIfOtherItemsAvailable

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Oct 20 04:41:43 CEST 2020


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

--- Comment #17 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
(In reply to Jonathan Druart from comment #15)
> (In reply to Aleisha Amohia from comment #14)
> > (In reply to Jonathan Druart from comment #13)
> > >   my $res = Koha::Holds->search({ biblionumber => $item->biblionumber,
> > > borrowernumber => $patron->borrowernumber })->next;
> > >   next unless $item->holdingbranch eq $res->branchcode;
> > > 
> > > What if a given patron has several holds on the same record? Should not we
> > > loop on the different holds instead of testing only the first one?
> > 
> > I guess we could put another condition in the search params like: 
> > 
> > my $res = Koha::Holds->search({ biblionumber => $item->biblionumber,
> > borrowernumber => $patron->borrowernumber, branchcode =>
> > $item->holdingbranch }, { order_by => { -asc => 'priority' } })->next;
> > 
> > What do you think?
> 
> My concern was about the other holds a patron could have on the same
> bibliographic record.
> I don't know if it makes sense but, reading the code:
> 
> 2826                     if (
> C4::Context->preference('AllowRenewalIfOtherItemsAvailableLocation') eq
> 'holdbranch' ){
> 2827                         my $res = Koha::Holds->search({ biblionumber =>
> $item->biblionumber, borrowernumber => $patron->borrowernumber })->next;
> 2828                         next unless $item->holdingbranch eq
> $res->branchcode;
> 2829                     }
> 
> We skip the patron if they have their first hold on this biblio in the
> holding library of the item.
> Should not we do this test on all the holds this patron has on the
> bibliographic record?
> 
> Katrin, what do you think?

Ugh, sorry, I just came across this.

I understand that the goal is that a renewal should be prevented, if there is a
another pending hold where the pickup library matches the holding branch
(checkout library) of the item to be renewed. Is that correct?

I think it might be unlikely for a patron to place multiple holds on a record
for pick-up at different libraries, but it would be possible. So looping
through all existing holds seems logical to me. 

But I am feeling unsure here about why we are interested in the holds of a
specific patron... are we not interested in looking at the holds for this
specific record in general?

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


More information about the Koha-bugs mailing list