Bug 20724: Correctly mark an hold as waiting - ReservesNeedReturns
We need to call Koha::Hold->set_waiting to correctly
calculate the expiration date.
It fixes a regression introduced by
commit
26634151dbce0bf39ff6c9eda5b58bb993996a2d
Bug 12063 - Fix QA failures
The expiration date has to be set for waiting holds
== Test plan (time to execute: less than 4min) ==
1. Set ReservesNeedReturns to "Don't automatically"
2. Place a hold on a specific item
3. Check it in and confirm hold
4. The hold should have an expiration date
record page → Hold → "Expiration" column
5. It should be listed in staff:/cgi-bin/koha/circ/waitingreserves.pl
6. Set ReservesNeedReturns to "Automatically"
7. Place a hold on a specific item
(which should also behave like we check the item in to
keep it for the patron)
8. The hold should have an *empty* expiration date
record page → Hold → "Expiration" column
9. Holds awaiting pickup page should crash
staff:/cgi-bin/koha/circ/waitingreserves.pl
10. Cancel the hold to remove the corrupted data
record page → Hold → the red X
11. Apply this patch
12. Place a hold on a specific item
13. The hold should have an expiration date (not empty)
14. It should be listed in staff:/cgi-bin/koha/circ/waitingreserves.pl
15. Celebrate!
Signed-off-by: Victor Grousset <victor.grousset@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit
c585f1149770ec401f188e061211501897cec0bf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>