Koha/C4
Olli-Antti Kivilahti 7767f2e53b 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>
2014-11-11 09:53:55 -03:00
..
AuthoritiesMarc
Barcodes
Bookseller Bug 10402 follow-up: choose contacts for claims 2014-08-26 11:45:59 -03:00
ClassSortRoutine Bug 8837: Dewey cn_sort inaccurate 2014-10-28 09:39:29 -03:00
Creators
External
Form
Heading Bug 10308 - local subjects can use authorities too 2014-09-01 10:45:07 -03:00
ILSDI Bug 12871 - wthdrawn instead of withdrawn in ILSDI 2014-10-27 10:59:47 -03:00
Installer Bug 11425: Add item search form in staff interface 2014-11-04 19:08:12 -03:00
Labels Bug 12068 - label-create-pdf.pl Add support for RTL language 2014-10-21 16:14:57 -03:00
Linker Bug 11650: multiplicated authorities after link_bibs_to_authorities.pl 2014-07-07 12:40:25 -03:00
Members Bug 13194: Fix typo in SetMessagingPreferencesFromDefaults POD 2014-11-06 10:14:13 -03:00
OAI
Output
Patroncards
Reports Bug 13141: Add ability for biblio_framework to be a dropdown in Guided Reports 2014-10-31 13:14:59 -03:00
Search
Serials
SIP Bug 12571 - Add ability to customize SIP2 screen messages 2014-10-28 09:26:47 -03:00
Utils Bug 12833: Patron search should search on extended attributes 2014-09-09 10:08:59 -03:00
VirtualShelves Bug 8521 - Error in warning message when deleting list 2014-08-05 20:44:28 -03:00
Accounts.pm Bug 11230 - Refactor C4::Stats::UpdateStats and add UT 2014-07-27 11:29:28 -03:00
Acquisition.pm Bug 7162; Factorize code for order cancellation (QA fixes) 2014-10-30 00:44:11 -03:00
Auth.pm Bug 13176 - Add links "My account" and "My checkouts" for logged in user to drop down in staff client header 2014-11-11 09:48:06 -03:00
Auth_cas_servers.yaml.orig
Auth_with_cas.pm Bug 12398: Fix CAS authentication validation 2014-08-01 10:13:49 -03:00
Auth_with_ldap.pm Bug 8148 - LDAP auth_by_bind doesn't fallback to local auth 2014-08-07 16:22:49 -03:00
Auth_with_shibboleth.pm BUG8446, QA Followup: Use DBIx::Class 2014-10-16 12:28:01 -03:00
AuthoritiesMarc.pm Bug 12654 Correct incorrectly quoted regexp 2014-07-30 11:06:27 -03:00
BackgroundJob.pm
Barcodes.pm
Biblio.pm Bug 12995 - script update_totalissues.pl stops on corrupted record 2014-10-31 14:14:24 -03:00
Bookseller.pm Bug 10402 follow-up: choose contacts for claims 2014-08-26 11:45:59 -03:00
Boolean.pm
Branch.pm Bug 9350: Making changes so that you can add the new fields to branches 2014-10-27 10:38:16 -03:00
Breeding.pm Bug 12898 - Z39.50 title search doesn't work with multiple words 2014-09-14 02:02:51 -03:00
Budgets.pm Bug 11714 - GetBudgetHierarchy needs optimization 2014-10-31 16:41:46 -03:00
Calendar.pm
Category.pm
Charset.pm Bug 9859: fix nsb_clean side effect 2014-10-22 14:06:14 -03:00
Circulation.pm Bug 13106 - Encapsulate Circulation::GetAgeRestriction() and modify it to check borrowers age as well. 2014-11-11 09:52:59 -03:00
ClassSortRoutine.pm Bug 12424 - ddc sorting of call numbers truncates long Cutter parts 2014-10-18 10:50:07 -03:00
ClassSource.pm
Context.pm Bug 12651: DOM indexing is the default 2014-10-27 12:35:44 -03:00
Contract.pm Bug 12487 [QA Followup] - GetContract must return undef with no params 2014-07-30 10:44:45 -03:00
CourseReserves.pm
Creators.pm
Csv.pm
Dates.pm
Debug.pm
Heading.pm
HoldsQueue.pm
HTML5Media.pm
Images.pm
ImportBatch.pm Bug 11876: (qa-followup) some minor changes 2014-10-31 14:25:13 -03:00
ImportExportFramework.pm
Input.pm
InstallAuth.pm Bug 11349: Remove unnecesary name translation 2014-07-17 11:05:58 -03:00
Installer.pm Bug 11593 - subtag_registry.sql files contain the same information for each language 2014-10-28 10:49:02 -03:00
ItemCirculationAlertPreference.pm
Items.pm Bug 11425: Get column names using DBIX 2014-11-04 19:10:28 -03:00
ItemType.pm
Koha.pm Bug 12874: A DB field without a default mapping is set to a default value on editing 2014-10-11 12:57:11 -03:00
Labels.pm
Languages.pm Bug 12534 - PROG/CCSR deprecation: Make getlanguages() theme independent for opac 2014-07-14 09:01:08 -03:00
Letters.pm Bug 13011: 0000-00-00 should not be considered as a valid date 2014-11-01 09:19:07 -03:00
Linker.pm Bug 11650: multiplicated authorities after link_bibs_to_authorities.pl 2014-07-07 12:40:25 -03:00
Log.pm Bug 11331 - CSV export for viewlog.pl is missing newlines 2014-08-05 20:23:26 -03:00
MarcModificationTemplates.pm
Matcher.pm
Members.pm Bug 13106 - Encapsulate Circulation::GetAgeRestriction() and modify it to check borrowers age as well. 2014-11-11 09:52:59 -03:00
Message.pm
NewsChannels.pm Bug 12507 - News does not always display in staff or OPAC 2014-08-24 12:37:06 -03:00
Output.pm Bug 12844: Remove the C4::Output::FormatNumber subroutine 2014-10-27 12:56:19 -03:00
Overdues.pm Bug 13018 : Static fine should be charged only once 2014-11-11 09:44:01 -03:00
Patroncards.pm
Print.pm
Ratings.pm Bug 12609: Add some unit tests for C4::Ratings 2014-09-17 22:08:57 -03:00
Record.pm Bug 13190: Reintroduce the checkouts export feature 2014-11-06 10:00:30 -03:00
Reports.pm Bug 12696: Remove CGI::scrolling_list from C4/Reports.pm 2014-08-15 14:44:50 -03:00
Reserves.pm Bug 13113 - Prevent juvenile/children from reserving ageRestricted material 2014-11-11 09:53:55 -03:00
Review.pm
Ris.pm
RotatingCollections.pm Bug 8836 [QA Followup] - Prevent multiple collections from having the same title 2014-11-06 15:12:20 -03:00
Scheduler.pm
Scrubber.pm
Search.pm Revert "Bug 9828: More specific indexing of UNIMARC 6XX fields" 2014-10-28 12:02:34 -03:00
Serials.pm Bug 5342: Serial claiming improvements: add a counter 2014-10-28 10:07:37 -03:00
Service.pm
ShelfBrowser.pm
SMS.pm Bug 3186 [QA Followup] - Don't return undef, just return 2014-10-30 01:23:12 -03:00
SocialData.pm
SQLHelper.pm Bug 11425: Get column names using DBIX 2014-11-04 19:10:28 -03:00
Stats.pm Bug 10860 - Change "in-house use" to "on-site checkout" 2014-11-03 10:26:22 -03:00
Suggestions.pm Bug 12627: Fix default values 2014-11-07 15:17:10 -03:00
Tags.pm Bug 12916 - Use of uninitialized values $max and $min in C4/Tags.pm 2014-10-30 00:31:36 -03:00
Templates.pm Bug 13170 Remove of prog theme broke the OPAC's "view plain" option for MARC details 2014-11-04 18:52:53 -03:00
TmplToken.pm
TmplTokenType.pm
TTParser.pm
UploadedFile.pm
UsageStats.pm Bug 11926: Follow-up - remove SearchEngine pref / fix POD 2014-10-22 15:17:14 -03:00
VirtualShelves.pm
XISBN.pm
XSLT.pm Bug 12655 [Revised] PROG/CCSR deprecation: Correct hard-coded opac-tmpl/prog path in XSLT 2014-10-30 09:35:12 +13:00