Bug 37591: Fix moredetail.tt performance issue

This patch fixes the performance issue in moredetail.tt by removing the
unnecessary call of checkout_renewals table.

To test:
1. Create lot of checkouts and renewals for a record.
2. Open the moredetail page for the record.
3. Check the timing of the page load.
4. Apply the patch and check the timing of the page load again.
5. The page load should be faster after applying the patch.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5c41c1c657)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Johanna Räisä 2024-08-09 08:58:31 +03:00 committed by Lucas Gass
parent 0935e9b30b
commit 85afecd491
1 changed files with 3 additions and 3 deletions

View File

@ -193,11 +193,11 @@
[% END %]
[% END %]
</li>
[% IF ITEM_DAT.object.checkout.renewals.count && ITEM_DAT.object.checkout %]
[% IF ITEM_DAT.object.checkout.renewals_count %]
<li>
<span class="label">Current renewals:</span>
[% ITEM_DAT.object.checkout.renewals.count | html %]
[ <a class="checkout_renewals_view" data-renewals="[% ITEM_DAT.object.checkout.renewals.count | html | html %]" data-issueid="[% ITEM_DAT.object.checkout.id | html %]" href="#">View</a> ]
[% ITEM_DAT.object.checkout.renewals_count | html %]
[ <a class="checkout_renewals_view" data-renewals="[% ITEM_DAT.object.checkout.renewals_count | html | html %]" data-issueid="[% ITEM_DAT.object.checkout.id | html %]" href="#">View</a> ]
</li>
[% END %]
[% IF itemlostloop %]