From 7ed002e676e8cab532b0f3c0c951fd0996918067 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Fri, 10 Nov 2023 11:01:58 +0000 Subject: [PATCH] Bug 35310: Only show 'Current renewals' link if item is currently checked out 1) Checkout an item to Koha user, barcode 39999000003192 2) Renew that barcode 3) Visit the items page of the biblio record, click on "View" in front of "Current renewals" /cgi-bin/koha/catalogue/moredetail.pl?biblionumber=76 4) Notice it shows the renewals as expected 5) Return the same item 39999000003192 6) Repeat 3). Notice it never loads renewals and network console shows HTTP error 400 7) Apply this patch. Repeat the test plan. Notice the 'Current renewals' no longer shows for the item because it is no longer checked out, so whatever past renewals are no longer 'current' Signed-off-by: David Nind Signed-off-by: Katrin Fischer (cherry picked from commit ebba646b46455d308cf9e8777bd9af92080156ae) Signed-off-by: Fridolin Somers (cherry picked from commit 467626119ad739330e2fec4c7b111ab3a4b520f9) Signed-off-by: Lucas Gass --- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt index 03374f2208..faa91036ee 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt @@ -180,7 +180,7 @@ [% END %] [% END %] - [% IF ITEM_DAT.renewals %] + [% IF ITEM_DAT.renewals && ITEM_DAT.object.checkout %]
  • Current renewals: [% ITEM_DAT.renewals | html %] -- 2.39.5