]> git.koha-community.org Git - koha.git/commit
Bug 21765: Make AutoUnsuspendReserves call Koha::Hold->resume
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 11 Feb 2019 19:05:23 +0000 (16:05 -0300)
committerJesse Maseto <jesse@bywatersolutions.com>
Fri, 8 Mar 2019 19:17:20 +0000 (19:17 +0000)
commitf7c5a910ded2bc15ccc2fa9cea557c61d7989f10
tree8c26d8b31ceb53bc88ca51cc4d321cb7b4742d38
parent13a769c5a8706825093fd85c79619ce8639573c5
Bug 21765: Make AutoUnsuspendReserves call Koha::Hold->resume

This patch makes the mentioned method use the biult-in method for
resuming a suspended hold, instead of manually setting the specific
attributes using the accessors.

The side effect for this is that HoldsLog is now honoured.

This patchset also refactors the tests a bit so they rely on the exposed
methods and thus don't rely on specific implementation details (like
suspended hold means a date in suspended_until plus suspended=1).

To test:
- Apply the regression tests patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Reserves/AutoUnsuspendReserves.t
=> FAIL: It fails loudly because things are done manually
- Apply this patch
- Run:
 k$ prove t/db_dependent/Reserves/AutoUnsuspendReserves.t
=> SUCCESS: Tests pass!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7c3a5c78c1aacbdb0ad7eb758cb9880ecefcce3a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7609009a7319ad6e631bac6fd39a8a5397566782)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
C4/Reserves.pm