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>
This commit is contained in:
Johanna Räisä 2024-08-09 08:58:31 +03:00 committed by Katrin Fischer
parent 7d0563e1c5
commit 5c41c1c657
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
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 %]