Bug 20724: Correctly mark an hold as waiting - ReservesNeedReturns
authorKyle M Hall <kyle@bywatetsolutions.com>
Thu, 10 May 2018 12:12:04 +0000 (08:12 -0400)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 16 May 2018 13:53:13 +0000 (10:53 -0300)
commitc585f1149770ec401f188e061211501897cec0bf
treeaf0800f132f2efb6ec764104942df95c318f3dbc
parent9b31bc2d27c6e045a6e7ea079778c47674c135db
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>
C4/Reserves.pm