Bug 9788: (follow-up) removing the alldates parameter from GetReservesFromItemnumber
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Thu, 26 Sep 2013 08:33:46 +0000 (10:33 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Fri, 17 Jan 2014 05:07:32 +0000 (05:07 +0000)
commit92be11bbcf20628dd7db8b83fc0b902ba578a28a
treeae5b8bcfa96f847d4f9ca92c765446e123c0230c
parent1a9737be768aa1e585addc596e2fcb5a77482c38
Bug 9788: (follow-up) removing the alldates parameter from GetReservesFromItemnumber

Before bug 9788 the alldates parameter of GetReservesFromItemnumber was
actually not used in the codebase.
The first patch of bug 9788 did change that and passed true by default.

But a closer look revealed that we do not really need it.

The parameter is removed by this patch; the SQL statement is slightly
adjusted: if reservedate<=now or a waitingdate is filled for the
requested itemnumber, GetReservesFromItemnumber will return the reserve.

This includes so-called future waits: a future hold that has been confirmed
ahead of time with pref ConfirmFutureHolds > 0 days.

Note that future item-level holds are not really interesting to return; this
just corresponds to original behavior. Future next-available holds are not
in view at all; they do not contain an item number.

Test plan:
Actually, the test plan of the first patch is valid. But for completeness I
repeat it here:

[1] Enable future holds and set ConfirmFutureHolds to 2 days.
[2] Place a future next-available hold for 2 days ahead.
[3] Check item status on catalogue detail. Available? That is fine.
[4] Confirm the future hold by checking it in. ('future wait')
[5] Look at item status again on catalogue detail. Must be Waiting now.
[6] Switch to OPAC and login as another opac user. Goto Place a hold.
[7] Check item status with item level hold info. Is it waiting?
[8] Try to place hold in staff, check item level status again. Waiting?
[9] Make a transfer for the item. Switch branch. Check hold status on
    Transfers to receive.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
C4/Reserves.pm
catalogue/detail.pl
circ/transferstoreceive.pl
opac/opac-reserve.pl
reserve/request.pl