bug 1710 and 1739: availability for item-level holds
authorGalen Charlton <galen.charlton@liblime.com>
Fri, 20 Jun 2008 18:59:33 +0000 (13:59 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Fri, 20 Jun 2008 19:14:49 +0000 (14:14 -0500)
commit784316826c828d9ea271c1168245e7562dd18acd
treed01c02a23257207eea27ca34ef65d3aeba0459da
parent5633d7a11cce4951697d0b1507b5ffbbc5ee598a
bug 1710 and 1739: availability for item-level holds

Fixed rules for determining whether an item is
available for an item-level hold request.  Create a
new function in C4::Reserves, IsAvailableForItemRequest(),
that checks whether an item is potentially available for
an item-level hold request.

An item is considered available if:

* it is not lost AND,
* it is not marked not for loan AND,
* it is not withdrawn AND,
* it is not damaged (unless the AllowHoldsOnDamagedItems syspref is ON), AND
* it is not on loan (unless the AllowOnShelfHolds syspref is ON)

Preventing a hold request on withdrawn items is bug 1739, as is
the new preference on whether to allow holds on damaged items.

Removing the condition that an item cannot be requested if
it has already been requested by another patron is the topic of bug 1710.

Note that this patch does not change the behavior where if
independent branches is on and the canreservefromotherbranches
syspref is off, a staff operator is prevented from placing
an item-level hold request on an item from a different branch.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Reserves.pm
opac/opac-reserve.pl
reserve/request.pl