[Koha-bugs] [Bug 31112] Able to renew checkout when the number of holds exceeds available number of items

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jul 19 10:53:03 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31112

sandboxes at biblibre.com <sandboxes at biblibre.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #137828|0                           |1
        is obsolete|                            |

--- Comment #6 from sandboxes at biblibre.com <sandboxes at biblibre.com> ---
Created attachment 137858
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137858&action=edit
Bug 31112: CanBookBeRenewed: take into account patrons with more than 1 hold to
a biblio

If a single patron had more than 1 hold to a biblio and there was only one
available item we allowed incorrectly renewing the checkout when
AllowRenewalIfOtherItemsAvailable was set to "Allow". This
changes CanBookBeRenewed so that it makes sure all the holds are
filled and not just one per patron.

To test:
 1) prove t/db_dependent/Circulation.t
 2) (Optional, as unit test is provided)
    - Set AllowRenewalIfOtherItemsAvailable = Allow
    - Create biblio with three items
    - Checkout one item to patron A
    - Add two biblio-level holds for patron B
    - Try to renew patron A's checkout with and without this patch.
    - Notice that without this patch the renewal succeeds even though we
      one unfilled hold left. After applying the patch the renewal should
      fail.

Signed-off-by: Sally <sally.healey at cheshiresharedservices.gov.uk>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list