Bug 13113 - Prevent juvenile/children from reserving ageRestricted material
authorOlli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Mon, 20 Oct 2014 12:37:17 +0000 (15:37 +0300)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Tue, 11 Nov 2014 12:53:55 +0000 (09:53 -0300)
commit7767f2e53b101bbd3b19e3fb0913833a6895fe66
tree7fed096215f643c506604de482cd738a31a3612e
parentae7d5fd11b2ed75e2fae120ec0499e3abc966c78
Bug 13113 - Prevent juvenile/children from reserving ageRestricted material

There is no reason for underage borrowers to reserve ageRestricted material and
then be denied it's check-out due to ageRestriction.

This patch prevents reserving material for borrowers not suitably aged.

 # # # # # #
 # A PRIORI #
 # # # # # #
BOTH THE STAFF CLIENT AND THE OPAC
1. Find a Record with Items, update the MARC Subfield 521a to "PEGI 16".
2. Get a Borrower who is younger than 16 years.
3. Place a hold for the underage Borrower for the ageRestricted Record.
4. You can reserve an ageRestricted Record with ease.
STAFF CLIENT ONLY
5. Check-in an Item from the ageRestricted Record and catch the reservation.
6. Check-out the ageRestricted Item for this underage Borrower.
7. You get a notification about being unable to check-out due to age restriction.
   How lame is that for a 12 year old?

 # # # # # # # #
 # A POSTERIORI #
 # # # # # # # #
STAFF CLIENT
1. Find a Record with Items, update the MARC Subfield 521a to "PEGI 16".
2. Get a Borrower who is younger than 16 years.
3. Check-out an ageRestricted Item for this underage Borrower.
4. You get a notification about having the maximum amount of reserves.
5. Place a hold for the underage Borrower for the ageRestricted Record.
6. You get a notification, that placing a hold on ageRestricted material is
   forbidden.

Includes Unit tests.

Followed test plan. Patch behaves as expected. (Note: Propagating error messages to template will be handled in Bug 13116 or 11999)

Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
C4/Reserves.pm
t/db_dependent/Reserves.t