Bug 28013: Performance improvements to CanBookBeRenewed
authorNick Clemens <nick@bywatersolutions.com>
Mon, 22 Mar 2021 13:03:11 +0000 (13:03 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 7 Apr 2021 14:28:07 +0000 (16:28 +0200)
commit0b8f4ec614f8e526f814c1d79a6729f7abcac874
tree1e07bfcee13249129911b52966dbf2e67266ffbd
parenta620c1bb116d82ea27934f643789a84f5c002a2b
Bug 28013: Performance improvements to CanBookBeRenewed

In the case of 'AllowRenewalIfOtherItemsAvailable' we check all existing reserves against
all existing items. This patchset reduces the number of DB/subroutine calls

To test:
1 - Apply patch
2 - prove -v t/db_dependent/Circulation.t

Signed-off-by: Amit Gupta <amitddng135@gmail.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Circulation.pm