[Koha-bugs] [Bug 15486] Restrict number of holds placed by day

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Oct 1 11:58:07 CEST 2018


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

--- Comment #75 from sandboxes at biblibre.com <sandboxes at biblibre.com> ---
Created attachment 79698
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=79698&action=edit
Bug 15486: Extend CanItemBeReserved so it handles daily holds limits

This patch implements the required changes in
C4::Reserves::CanItemBeReserved so it implements a daily limit on holds.

It returns the 'tooManyReservesToday' string if the policy doesn't allow
placing the hold. It returns 'OK' (current behaviour) otherwise.

To test:
- Run:
  $ sudo koha-shell kohadev
 k$ cd kohaclone
 k$ prove t/db_dependent/Holds.t
=> FAIL: Tests fail because the error condition is not making
CanItemBeReserved return the desired error code.
- Apply this patch
- Run:
 k$ prove t/db_dependent/Holds.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Séverine QUEUNE <severine.queune at bulac.fr>

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


More information about the Koha-bugs mailing list