Bug 22456: Add cancellation request methods to Koha::Hold
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 18 May 2022 17:05:04 +0000 (14:05 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 29 Jul 2022 18:28:25 +0000 (15:28 -0300)
commite22e91aae4912b97a4bd8729e8c97efbfd8f3e44
treef858ce6bd65c161bd4a1e3d72f2255b8ef7ca96d
parent100e79de477b0e276ca795567ce6a5e8d624fbaf
Bug 22456: Add cancellation request methods to Koha::Hold

This patch adds the following helper methods for dealing with hold
cancellation requests to the Koha::Hold class:

 * cancellation_requests
 * add_cancellation_request
 * cancellation_requestable_from_opac
 * cancellation_requested_by_owner

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Hold.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Sponsored-by: Montgomery County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/Exceptions.pm
Koha/Hold.pm
Koha/Schema/Result/Reserve.pm
t/db_dependent/Koha/Hold.t