https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42529
Bug ID: 42529
Summary: Move GetAgeRestriction to Koha namespace
Initiative type: ---
Sponsorship ---
status:
Product: Koha
Version: Main
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Architecture, internals, and plumbing
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
`C4::Circulation::GetAgeRestriction` parses age restriction strings (e.g. "FSK
16", "PEGI 6") from biblio metadata using the AgeRestrictionMarker system
preference. It is used in 3 places (C4::Circulation twice, C4::Reserves once).
I propose:
* Add Koha::Biblio->age_restriction method that parses the restriction string
and returns the numeric age (or undef if none)
* Add Koha::Patron->meets_age_restriction($biblio) that returns whether the
patron meets the age restriction
* Replace all GetAgeRestriction callers with the new methods
* Remove GetAgeRestriction from C4::Circulation
* Move the existing test (t/Circulation/AgeRestrictionMarkers.t) to cover the
new methods
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/