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: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org `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.