Bug 28435 - CanBookBeRenewed returns only a single status and falsely indicates renewal can be overridden
Summary: CanBookBeRenewed returns only a single status and falsely indicates renewal c...
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
Depends on:
Reported: 2021-05-24 12:46 UTC by Nick Clemens
Modified: 2022-08-25 16:27 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2021-05-24 12:46:27 UTC
Similar to bug 22866 - depending on system settings you may or may not be able to override a hold to renew an item.

For instance - if an item is on hold, and the renewal limit has been reached CanBookBeRenewed returns 'TooMany'

Checking the 'Override renewal restrictions' button makes the hold appear renewable.

Executing the renewal fails because of 'On hold'

Returning all status would allow us to sort which can be overridden and which cannot, however, there would be a performance cost for patrons with many checkouts.

We could also develop an API route to check when the override button is checked, calculating if renewal is possible with override and only allowing the checkbox if so.

Alternately, we could add a system preference to always return all statuses and allow the library to choose performance vs completeness of response.

I am not sure the bets path and am filing this bug for discussion.
Comment 1 Jonathan Druart 2021-06-07 10:15:46 UTC
This made me think I tried "that" already on bug 25758.

Is it what you meant?