https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814
--- Comment #7 from Lari Taskula <lari.task...@hypernova.fi> --- Created attachment 112382 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112382&action=edit Bug 26814: Add onsite_checkout to get_effective_rule To test: 1. Find all occurrences of get_effective_rule that are missing onsite_checkout where required grep --exclude-dir '.git' --exclude-dir 'misc/translator' \ --exclude-dir 'koha-tmpl' \ -Przo '(?s)(::|->)get_effective_rule(?!s).*?\)' | \ grep -avz 'onsite_checkout' | \ grep -Pavz 'hold|reserves|article_requests' && echo "" The only occasions this should return anything are cases where a HASH or HASHref is given to get_effective_rule(), or that we are explicitly testing missing parameters in an unit test. 1.2 Verify the HASH/HASHref cases. The hash should contain a onsite_checkout (unless the rule is related to holds) 1.3 Verify the other cases. If you find another result than what is mentioned above, then this test fails. 2. Find all subroutines using get_effective_rule() git grep --no-index -n -p -P 'get_effective_rule\s*\(' \ | grep -v 'sub {' | grep -P 'sub .*' This list should be returned: C4/Circulation.pm=394=sub TooMany { C4/Circulation.pm=1375=sub AddIssue { C4/Circulation.pm=1697=sub GetBranchBorrowerCircRule { C4/Circulation.pm=1753=sub GetBranchItemRule { C4/Circulation.pm=3040=sub GetRenewCount { C4/Reserves.pm=359=sub CanItemBeReserved { C4/Reserves.pm=2245=sub GetHoldRule { Koha/Biblio.pm=295=sub article_request_type_for_bib { Koha/Charges/Fees.pm=93=sub accumulate_rentalcharge { Koha/CirculationRules.pm=221=sub get_effective_rules { Koha/CirculationRules.pm=395=sub get_opacitemholds_policy { Koha/CirculationRules.pm=421=sub get_onshelfholds_policy { Koha/CirculationRules.pm=443=sub get_lostreturn_policy { Koha/CirculationRules.pm=538=sub get_effective_daysmode { Koha/Item.pm=617=sub article_request_type { Koha/REST/V1/Checkouts.pm=192=sub allows_renewal { Koha/Template/Plugin/CirculationRules.pm=26=sub Get { Check these subroutines and make sure they are using get_effective_rule() with the new scope, unless not needed. When fetching a hold-related rules, onsite_checkout is not needed. These subroutines and classes need changes to sub params: 2.1. Check modifications to Koha::Charges::Fees 2.2. Check modification made to C4::Circulation::_debar_user_on_return(). 2.3. Check modification made to C4::Circulation::_calculate_new_debar_dt(). 3. Find all occurrences of get_effective_rule with the following command: grep --exclude-dir='.git' -Prn 'get_effective_rule(?!s)' Make sure all matches (where rule scope allows onsite_checkout) are updated. Sponsored-by: The National Library of Finland -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/