[Koha-bugs] [Bug 26814] Add onsite_checkout to circulation rules
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Dec 16 00:31:53 CET 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814
Lari Taskula <lari.taskula at hypernova.fi> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #112625|0 |1
is obsolete| |
--- Comment #36 from Lari Taskula <lari.taskula at hypernova.fi> ---
Created attachment 114424
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114424&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' | less
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=1663=sub GetLoanLength {
C4/Circulation.pm=1702=sub GetHardDueDate {
C4/Circulation.pm=2386=sub _calculate_new_debar_dt {
C4/Circulation.pm=2736=sub CanBookBeRenewed {
C4/Circulation.pm=3160=sub GetRenewCount {
C4/Circulation.pm=3239=sub GetSoonestRenewDate {
C4/Circulation.pm=3303=sub GetLatestAutoRenewDate {
C4/Overdues.pm=224=sub CalcFine {
C4/Reserves.pm=2263=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