]> git.koha-community.org Git - koha.git/commit
Bug 36672: Circulation rules are performing too many lookups
authorKyle M Hall <kyle@bywatersolutions.com>
Fri, 26 Apr 2024 17:41:06 +0000 (17:41 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Thu, 27 Jun 2024 22:03:51 +0000 (22:03 +0000)
commit12fc84358a5efc312ef3862c2e747cfbed3ba0ca
treeb692e56c88e3c4742b9bfe8f9be4a34c54a0bb0a
parent58b5228af0159ab94111e789b6bc9e492321289d
Bug 36672: Circulation rules are performing too many lookups

Looking at the template, for every section after the main rules block we loop over categories or itemtypes, and lookup the value for each rule name.

In systems with large numbers of categories and item types this becomes very slow.

In the rules section, we have already built a hash of rules by category and itemtype - we should continue to use this throughout the page.

Test Plan:
1) Apply this patch
2) For each rule section, create and delete a rule
3) No change in behavior should be noted!

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit aa2befcec89b867c536d2f38203dc817adcf2b5c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt