Bug 2394: Use syspref canreservefromotherbranches in CanItemBeReserved
authorJulian Maurice <julian.maurice@biblibre.com>
Tue, 9 Jul 2013 09:48:23 +0000 (11:48 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Tue, 10 Sep 2013 15:59:09 +0000 (12:59 -0300)
commit91211febd5606e4c3713f235817ec0f4a46128c9
tree3188f0253a8d54d076c48224470d08dffb34cd55
parent3d05ea27a7237006d1256df9b476f4886b027233
Bug 2394: Use syspref canreservefromotherbranches in CanItemBeReserved

If IndependentBranches is ON, patrons are not allowed to place
hold requests on items whose owning library is different from
the patron's home library, *unless* the canreservefromotherbranches
system preference is also ON.

The patch implements the intended behavior; without it, IndependentBranches
and canreservefromotherbranches were not consulted during the
item holdability check.

To test:

[1] Have IndependentBranches ON and canreservefromotherbranches
    OFF.  Make sure that the circulation rules are set up to
    permit patrons to place hold requests in general.
[2] In the OPAC, log in as a patron from library A, and try placing
    a hold on an item from library B.  The patron will be able to
    place the request.
[3] Cancel the request.
[4] Apply the patch.
[5] Try placing the same hold request.  This time, the request should
    be forbidden.
[6] Turn on canreservefromotherbranches.
[7] Try placing the hold request.  This time, it should go through.
[8] Cancel the request.
[9] Turn off IndependentBranches.
[10] Try placing the hold request and verify that it is permitted.
[10]

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 2cbc47a871efc60ae663ecfedf59ec77dda718f4)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as expected.
Note: on my tests i first forgot to enable AllowOnShelfHolds to get this working. It is not mentioned on the test description.
C4/Reserves.pm