[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
Wed Sep 30 21:56:05 CEST 2020


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

--- Comment #14 from Aleisha Amohia <aleisha at catalyst.net.nz> ---
(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?

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


More information about the Koha-bugs mailing list