[Koha-bugs] [Bug 25089] Add checkout_type to circulation rules

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Apr 21 12:28:16 CEST 2020


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

Lari Taskula <lari.taskula at hypernova.fi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #103291|0                           |1
        is obsolete|                            |

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

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

grep --exclude-dir '.git' --exclude-dir 'misc/translator' \
--exclude-dir 'koha-tmpl' \
-Przo '(?s)(::|->)get_effective_rules.*?\)' | \
grep -avz 'checkout_type' && 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:

git grep --no-index -n -p 'get_effective_rules' | grep -P 'sub .*'

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 checkout_type) 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 checkout_type 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