Bug 29483: Further improve performance of script
authorNick Clemens <nick@bywatersolutions.com>
Fri, 19 Nov 2021 16:13:49 +0000 (16:13 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 20 Apr 2022 07:25:51 +0000 (21:25 -1000)
commitaa8e9fe5c5ba7a9d1e7f688e894d460ef5adc94d
treef6084b8e3ea7ad94c997dde457dfdc0632c7f956
parent68c92b49d12f4e16fb6679835cc04eeda8c51633
Bug 29483: Further improve performance of script

This patch adds a few tests to cover more cases, and to highlight current functionality.

The script only allows renewal if all outstanding holds can be filled by available items.
This means we can return as soon as we have determined that not all holds can be filled.

I add FIXME and some explanatory comments - I will file a follow-up bug for those, but
I feel we can accept these improvements to the performance and deal with the issues
of how it 'should' work versus how it does work on another report.

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

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/Circulation.pm
t/db_dependent/Circulation.t