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. # # # # # # # # # # # # REPLICATE THIS ISSUE # # # # # # # # # # # # 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. 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? # # # # # # # # # # AFTER THE PATCH # # # # # # # # # # 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 beign unable to check-out due to age restriction. 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.
Created attachment 32539 [details] [review] 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. # # # # # # # # # # # # # # # # # # # # # # 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. 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? # # # # # # # # # # # # # # # # # # 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.
Should status be "Needs Signoff?
Created attachment 32549 [details] [review] 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. OPAC A. In OPAC go to opac-detail.pl for the ageRestricted Biblio. The "Place Hold" -button is missing on the right sidebar if the underage user is logged in. B. From the opac-search.pl a hold can still be placed, but it will fail giving an error about age restrictions. Includes Unit tests.
Created attachment 32621 [details] [review] 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. OPAC A. In OPAC go to opac-detail.pl for the ageRestricted Biblio. The "Place Hold" -button is missing on the right sidebar if the underage user is logged in. B. From the opac-search.pl a hold can still be placed, but it will fail giving an error about age restrictions. Includes Unit tests.
Created attachment 32626 [details] [review] 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.
Created attachment 32661 [details] [review] 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.
Hi! Just pushed this featureset to production, so I am rather confident about this :) Have fun!
Just a note, to test this you will need to make sure you have biblioitems.agerestriction mapped to a tag in your framework, or the tests will die.
Created attachment 32915 [details] [review] 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>
Created attachment 33071 [details] [review] 32915: Bug 13113 - Prevent juvenile/children from reserving ageRestricted material
Created attachment 33072 [details] [review] Bug 13113 [QA Followup] - Fix unit test
Patches pushed to master. Thanks Olli!