[Koha-bugs] [Bug 26814] Add onsite_checkout to circulation rules

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Oct 24 06:20:59 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

--- Comment #8 from Lari Taskula <lari.taskula at hypernova.fi> ---
Created attachment 112383
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112383&action=edit
Bug 26814: Add onsite_checkout to get_effective_rules

To test:
1. Find all occurrences of get_effective_rules that are missing
   onsite_checkout where required

grep --exclude-dir '.git' --exclude-dir 'misc/translator' \
--exclude-dir 'koha-tmpl' \
-Przo '(?s)(::|->)get_effective_rules.*?\)' | \
grep -avz 'onsite_checkout' && echo ""

   1.1. Verify command output. Only reserve related calls to
        get_effective_rules() should be returned.

2. Find all subroutines using get_effective_rules()

git grep --no-index -n -p -P 'get_effective_rules\s*\(' \
| grep -v 'sub {' | grep -P 'sub .*'

    This list should be returned:

    C4/Circulation.pm=1611=sub GetLoanLength {
    C4/Circulation.pm=1650=sub GetHardDueDate {
    C4/Circulation.pm=2301=sub _calculate_new_debar_dt {
    C4/Circulation.pm=2654=sub CanBookBeRenewed {
    C4/Circulation.pm=3107=sub GetSoonestRenewDate {
    C4/Circulation.pm=3171=sub GetLatestAutoRenewDate {
    C4/Overdues.pm=224=sub CalcFine {
    C4/Reserves.pm=2245=sub GetHoldRule {

    Check these subroutines and make sure they are using
    get_effective_rules() with the new scope, unless not needed.
    When fetching a hold-related rules, checkout_type is not needed.

3. Check modification made to C4::Circulation::CalcDateDue()
4. Check modification made to C4::Circulation::CalcFine()
5. Check modification made to C4::Circulation::GetLoanLength()
6. Check modification made to C4::Circulation::GetHardDueDate()

    Make sure all matches (where rule scope allows onsite_checkout) are
    updated.

7. Run these unit tests:

grep -Prl --color=never 'get_effective_rule\(|set_rule\(|set_rules\(' \
t/db_dependent/ | grep '^.*\.t$' | xargs prove

8. Test onboarding tool
8.1. Drop&create your database (take backups first if needed)
8.2. Navigate to web installer
8.3. Continue until you reach onboarding tool step where circulation
     rules are added.
8.4. Observe new drop down selection "Checkout type".
8.5. Select any checkout type and continue the onboarding process.
8.6. Investigate your database table "circulation_rules". You should
     now have rules with onsite_checkout of your choice.

Sponsored-by: The National Library of Finland

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list