Bug 41017 - Show if item is on hold even if OverduesBlockRenewing is on
Summary: Show if item is on hold even if OverduesBlockRenewing is on
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
: 26440 40900 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-10-14 17:29 UTC by Caroline Cyr La Rose
Modified: 2025-10-17 19:06 UTC (History)
7 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 41017: Show if item is on hold even if OverduesBlockRenewing is on (5.03 KB, patch)
2025-10-16 09:42 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 41017: Show if item is on hold even if OverduesBlockRenewing is on (5.10 KB, patch)
2025-10-17 15:36 UTC, Marie-Luce Laflamme
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Caroline Cyr La Rose 2025-10-14 17:29:20 UTC
I've had a comment by a library that uses OverduesBlockRenewing as well as  AllowRenewalLimitOverride (and AllowRenewalOnHoldOverride) that when the item is overdue, the fact that it's on hold is not displayed in the patron's checkouts. Their issue is that while they don't want patrons renewing overdue items from the OPAC, they sometimes override the renewal in the staff interface, but end up unknowingly renewing something that is on hold...

To recreate in main:
1. Go to a patron's account and checkout with a past date to create an overdue checkout
2. Place a hold for the same item for another patron
3. View the first patron's checkouts
   --> In the "Renew" column, it says "On hold"

4. Enable AllowRenewalOnHoldOverride
5. Go back to the patron's checkouts
   --> The "Renew" column should still say "On hold"
6. Check the "Override renewal restrictions" box
   --> A check box appears in the "Renew" column, which still displays "On hold" nonetheless

7. Enable OverduesBlockRenewing ("block renewing for all the patron's items") (I think both blocks should work in this scenario, but the library has it set to all)
8. Enable AllowRenewalLimitOverride
9. Go back to the patron's checkouts
   --> The "Renew" column displays "Not allowed: overdue" (OK) No mention of on hold (NOT OK?)
10. Check the "Override renewal restrictions" box
   --> A check box appears in the "Renew" column (OK), still no mention of on hold (NOT OK?)

The "On hold" mention should be displayed whether or not the item is overdue.
Comment 1 Marie-Luce Laflamme 2025-10-15 18:32:20 UTC
Just adding a bit of background: this behaviour was also present in versions 22.05 and earlier. At that time, Koha prioritised the "no renewal" message when reaching the renewal limit or overdue instead of showing the "hold" alert. It was fixed in 23.05 but seems to have reappeared in 24.05.

others bugs mentioning this:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26440
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36331
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34809
Comment 2 Jonathan Druart 2025-10-16 09:28:48 UTC
*** Bug 26440 has been marked as a duplicate of this bug. ***
Comment 3 Jonathan Druart 2025-10-16 09:29:02 UTC
*** Bug 40900 has been marked as a duplicate of this bug. ***
Comment 4 Jonathan Druart 2025-10-16 09:42:42 UTC
Created attachment 187980 [details] [review]
Bug 41017: Show if item is on hold even if OverduesBlockRenewing is on

"On hold" is useful for librarians and we should show it whether or not the item is overdue.

There has been several attempts to fix this problem, in C4::Circulation::CanBookBeRenewed,
but this patch suggests to have a dedicated (ugly) test for this
specific situation.

Test plan (from Caroline comment 0):
1. Go to a patron's account and checkout with a past date to create an overdue checkout
2. Place a hold for the same item for another patron
3. View the first patron's checkouts
   --> In the "Renew" column, it says "On hold"

4. Enable AllowRenewalOnHoldOverride
5. Go back to the patron's checkouts
   --> The "Renew" column should still say "On hold"
6. Check the "Override renewal restrictions" box
   --> A check box appears in the "Renew" column, which still displays "On hold" nonetheless

7. Enable OverduesBlockRenewing ("block renewing for all the patron's items") (I think both blocks should work in this scenario, but the library has it set to all)
8. Enable AllowRenewalLimitOverride
9. Go back to the patron's checkouts
   --> The "Renew" column displays "Not allowed: overdue" with mention of on hold
10. Check the "Override renewal restrictions" box
   --> A check box appears in the "Renew" column with mention of on hold

The "On hold" mention is displayed whether or not the item is overdue.
Comment 5 Caroline Cyr La Rose 2025-10-16 15:28:52 UTC
I tried the patch, but it looks the same as before... I don't see a mention of oh hold at step 9 or 10.

Is there something i should have done after applying the patch? I only did reset_all, but maybe there's something else?
Comment 6 Jonathan Druart 2025-10-17 04:03:21 UTC
(In reply to Caroline Cyr La Rose from comment #5)
> I tried the patch, but it looks the same as before... I don't see a mention
> of oh hold at step 9 or 10.
> 
> Is there something i should have done after applying the patch? I only did
> reset_all, but maybe there's something else?

There is nothing else. restart_all should be enough.
I have retried following the test plan and it still works for me: https://snipboard.io/tzNIbT.jpg
Comment 7 Caroline Cyr La Rose 2025-10-17 15:13:05 UTC
I have retried again and I don't see it... I stopped and restarted my KTD in case that was it (also pulled just in case).

I tried three times with a variation of the following

ktd down
git reset --hard origin/main (in koha)
git pull (in koha)
git pull (in koha-testing-docker)
ktd pull
ktd up
git bz apply 41017
reset_all

With AllowRenewalOnHoldOverride I see the "On hold" message (normal)
With OverduesBlockRenewing set to either blocking options and AllowRenewalLimitOverride set to allow I don't see the "On hold" message
https://snipboard.io/1kL0Zw.jpg

I notice yours doesn't have the same columns as mine. I don't have an extra column where it says "On hold" and I don't have the Claimed returned option.
Comment 8 Marie-Luce Laflamme 2025-10-17 15:36:07 UTC
Created attachment 188105 [details] [review]
Bug 41017: Show if item is on hold even if OverduesBlockRenewing is on

"On hold" is useful for librarians and we should show it whether or not the item is overdue.

There has been several attempts to fix this problem, in C4::Circulation::CanBookBeRenewed,
but this patch suggests to have a dedicated (ugly) test for this
specific situation.

Test plan (from Caroline comment 0):
1. Go to a patron's account and checkout with a past date to create an overdue checkout
2. Place a hold for the same item for another patron
3. View the first patron's checkouts
   --> In the "Renew" column, it says "On hold"

4. Enable AllowRenewalOnHoldOverride
5. Go back to the patron's checkouts
   --> The "Renew" column should still say "On hold"
6. Check the "Override renewal restrictions" box
   --> A check box appears in the "Renew" column, which still displays "On hold" nonetheless

7. Enable OverduesBlockRenewing ("block renewing for all the patron's items") (I think both blocks should work in this scenario, but the library has it set to all)
8. Enable AllowRenewalLimitOverride
9. Go back to the patron's checkouts
   --> The "Renew" column displays "Not allowed: overdue" with mention of on hold
10. Check the "Override renewal restrictions" box
   --> A check box appears in the "Renew" column with mention of on hold

The "On hold" mention is displayed whether or not the item is overdue.

Signed-off-by: Marie-Luce Laflamme <marie-luce.laflamme@inlibro.com>
Comment 9 Caroline Cyr La Rose 2025-10-17 19:06:08 UTC
Marie-Luce was able to see the change on a "vintage" installation after restarting apache. I tried reset_all AND restart_all on ktd and I still don't see it. :(