Bug 40690 - Checkout status doesn't appear on moredetail.pl if item is not checked out
Summary: Checkout status doesn't appear on moredetail.pl if item is not checked out
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: David Cook
QA Contact: Marcel de Rooy
URL:
Keywords: Academy
Depends on:
Blocks:
 
Reported: 2025-08-22 06:19 UTC by David Cook
Modified: 2025-10-10 13:19 UTC (History)
5 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.11.00,25.05.04,24.11.10
Circulation function:


Attachments
Bug 40690: Fix if/else/end logic for checkout (1.98 KB, patch)
2025-08-22 06:27 UTC, David Cook
Details | Diff | Splinter Review
Bug 40690: Fix if/else/end logic for checkout (2.13 KB, patch)
2025-08-25 07:51 UTC, OpenFifth Sandboxes
Details | Diff | Splinter Review
Bug 40690: Fix if/else/end logic for checkout (2.22 KB, patch)
2025-08-29 07:06 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2025-08-22 06:19:58 UTC
If you go to /cgi-bin/koha/catalogue/moredetail.pl?biblionumber=29 on a fresh KTD, you'll see that there is a blank next to "Checkout status:". 

This might not seem weird at first, until you notice that moredetail.tt actually has some HTML that you think would apply in this scenario: <span>Not checked out</span>

If you look at the template, you quickly see there's clearly a bug there.
Comment 1 David Cook 2025-08-22 06:27:00 UTC
Created attachment 185705 [details] [review]
Bug 40690: Fix if/else/end logic for checkout

This change fixes the Checkout status on moredetail.pl so that it
actually shows "Not checked out" when it's not checked out.

Test plan:
0. Apply the patch
1. Go to /cgi-bin/koha/catalogue/moredetail.pl?biblionumber=29 on a fresh KTD
2. Note that the "Checkout status" is "Not checked out"
3. Check out the item to someone
4. Go to /cgi-bin/koha/catalogue/moredetail.pl?biblionumber=29
5. Note that it says "Checked out to <person> Due back on <date>"
6. Renew the item
7. Go to /cgi-bin/koha/catalogue/moredetail.pl?biblionumber=29
8. Note that it says "Checked out to <person> Last renewed <date>, Due back on <date>"
Comment 2 OpenFifth Sandboxes 2025-08-25 07:51:32 UTC
Created attachment 185727 [details] [review]
Bug 40690: Fix if/else/end logic for checkout

This change fixes the Checkout status on moredetail.pl so that it
actually shows "Not checked out" when it's not checked out.

Test plan:
0. Apply the patch
1. Go to /cgi-bin/koha/catalogue/moredetail.pl?biblionumber=29 on a fresh KTD
2. Note that the "Checkout status" is "Not checked out"
3. Check out the item to someone
4. Go to /cgi-bin/koha/catalogue/moredetail.pl?biblionumber=29
5. Note that it says "Checked out to <person> Due back on <date>"
6. Renew the item
7. Go to /cgi-bin/koha/catalogue/moredetail.pl?biblionumber=29
8. Note that it says "Checked out to <person> Last renewed <date>, Due back on <date>"

Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Comment 3 Marcel de Rooy 2025-08-29 07:05:45 UTC
[% IF ( checkout.date_due ) %]
    <span>Due back on [% checkout.date_due | $KohaDates as_due_date => 1 %]</span>
[% END %]

Makes me wonder if you could checkout without a due date ;)
Comment 4 Marcel de Rooy 2025-08-29 07:06:26 UTC
Created attachment 185873 [details] [review]
Bug 40690: Fix if/else/end logic for checkout

This change fixes the Checkout status on moredetail.pl so that it
actually shows "Not checked out" when it's not checked out.

Test plan:
0. Apply the patch
1. Go to /cgi-bin/koha/catalogue/moredetail.pl?biblionumber=29 on a fresh KTD
2. Note that the "Checkout status" is "Not checked out"
3. Check out the item to someone
4. Go to /cgi-bin/koha/catalogue/moredetail.pl?biblionumber=29
5. Note that it says "Checked out to <person> Due back on <date>"
6. Renew the item
7. Go to /cgi-bin/koha/catalogue/moredetail.pl?biblionumber=29
8. Note that it says "Checked out to <person> Last renewed <date>, Due back on <date>"

Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Lucas Gass (lukeg) 2025-08-29 17:10:41 UTC
Nice work everyone!

Pushed to main for 25.11
Comment 6 Paul Derscheid 2025-09-20 08:59:28 UTC
Nice work everyone!

Pushed to 25.05.x
Comment 7 Fridolin Somers 2025-10-10 13:19:06 UTC
Pushed to 24.11.x for 24.11.10