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

2020-12-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112653|0   |1
is obsolete||

--- Comment #39 from Lari Taskula  ---
Created attachment 114427
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114427=edit
Bug 26814: (SMART-RULES GUI) Disable hold rules when on-site option selected

SMART-RULES GUI tag means that this patch will apply before Bug 15522.

To test:
1. Apply patch
2. Go to Circulation and fine rules in staff client
3. Observe the main circulation rules matrix, observe the following columns:

   Holds allowed (total)
   Holds allowed (daily)
   Holds per record (count)
   On shelf holds allowed
   OPAC item level holds
   Article requests

4. Set "On-site checkout" to "No" or "On-site"
5. Observe the columns in step 3, they should now be disabled
6. Set "On-site checkout" to "All"
7. Observe the columns in step 3, they should now be enabled
8. Add a new rule:

   On-site checkout: "On-site"
   Current checkouts allowed: 1

   and click Save.

9. Find the row you just added and press Edit.
10. Observe the columns in step 3, they should now be disabled
11. Press Edit for any other row where On-site checkout is "All"
12. Observe the columns in step 3, they should now be enabled

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/


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

2020-12-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112652|0   |1
is obsolete||

--- Comment #38 from Lari Taskula  ---
Created attachment 114426
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114426=edit
Bug 26814: (SMART-RULES GUI) Indent and add onsite_checkout to all_rules hash

SMART-RULES GUI tag means that this patch will apply before Bug 15522.

No other changes in this patch.

To test:
1. git diff --word-diff=color --ignore-all-space HEAD~1 --
koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt
2. Observe only $osc has been added

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/


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

2020-12-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112651|0   |1
is obsolete||

--- Comment #37 from Lari Taskula  ---
Created attachment 114425
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114425=edit
Bug 26814: (SMART-RULES GUI) Add onsite_checkout into user interface

SMART-RULES GUI tag means that this patch will apply before Bug 15522.

To test:
1. Go to Circulation rules page in Koha
2. Observe checkout type column in the rule matrix
3. Test circulation rules matrix by setting, modifying and deleting
   rules.
4. Test default checkout, hold and return policy settings.
5. Test default checkout, hold policy by patron category settings.

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/


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

2020-12-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112625|0   |1
is obsolete||

--- Comment #36 from Lari Taskula  ---
Created attachment 114424
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114424=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 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.
___
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/


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

2020-12-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112624|0   |1
is obsolete||

--- Comment #35 from Lari Taskula  ---
Created attachment 114423
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114423=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|lostreturn' | less

   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 (line numbers not meaningful):

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/


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

2020-12-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112623|0   |1
is obsolete||

--- Comment #34 from Lari Taskula  ---
Created attachment 114422
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114422=edit
Bug 26814: Add onsite_checkout to set_rules

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

grep --exclude-dir '.git' --exclude-dir 'misc/translator' \
--exclude-dir 'koha-tmpl' -Przo '(?s)(::|->)set_rules.*?\)' \
--exclude="smart-rules.pl" --exclude="smart-rules.tt" | \
grep -avz 'onsite_checkout' | less

   The only occasions this should return anything are cases where
   a HASH or HASHref is given to set_rules(), or that we are
   explicitly testing missing parameters in an unit test, or that
   rules are only related to holds

   1.2 Verify the HASH/HASHref cases. The hash should contain
   a onsite_checkout (unless the rule is related to holds)

2. Find all subroutines using set_rules()

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

   2.1 The only return should be
   t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t=401=
 sub set_holdallowed_rule {

3. The boring step. Find all occurrences of set_rules() with
   the following command:

grep --exclude-dir='.git' -Prn 'set_rules'

Go through this list and make sure all neccessary locations are
updated. A change is required when the rule scope includes
onsite_checkout. See Koha/CirculationRules.pm for scopes.
Hold/reserve related rules do not require it.

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/


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

2020-12-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112380|0   |1
is obsolete||

--- Comment #33 from Lari Taskula  ---
Created attachment 114421
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114421=edit
Bug 26814: Add onsite_checkout to set_rule

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

grep --exclude-dir '.git' --exclude-dir 'misc/translator' \
--exclude-dir 'koha-tmpl' -Przo '(?s)(::|->)set_rule(?!s).*?\)' | \
grep -avz 'onsite_checkout' | grep -Pavz
'hold|reserves|article_requests|lostreturn' \
&& echo ""

   The only occasions this should return anything are cases where
   a HASH or HASHref is given to set_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)

2. Find all subroutines using set_rule()

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

   2.1 The only return should be
   Koha/CirculationRules.pm=331=sub set_rules {

3. The boring step. Find all occurrences of set_rule() with
   the following command:

grep --exclude-dir='.git' -Prn 'set_rule' | grep -v set_rules

   Go through this list and make sure all neccessary locations are
   updated. A change is required when the rule scope includes
   onsite_checkout. See Koha/CirculationRules.pm for scopes.
   Hold/reserve related rules do not require it.

4. Check changes to CirculationRule objects built with TestBuilder

cd t && grep -Prn "CirculationRules?'"

   Make sure all these cases are updated with onsite_checkout => undef,
   otherwise tests will fail later on.

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/


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

2020-12-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112379|0   |1
is obsolete||

--- Comment #32 from Lari Taskula  ---
Created attachment 114420
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114420=edit
Bug 26814: Remove on-site specific circulation rules

To apply:
1. perl installer/data/mysql/updatedatabase.pl

To test:
1. Search for patron_maxonsiteissueqty rule

   $ grep -rn 'patron_maxonsiteissueqty'

2. Observe no results in Koha source files (excluding .git, atomicupdates,
   updatedatabase.pl, release notes, smart-rules.pl, smart-rules.tt)
3. Search for maxonsiteissueqty rule

   $ grep -rn 'maxonsiteissueqty'

4. Observe no results (excluding .git, atomicupdates and updatedatabase.pl,
   release notes, smart-rules.pl, smart-rules.tt)
5. Check modification made to C4::Circulation::GetBranchBorrowerCircRule().
   Make sure the new parameter is being used everywhere. You can search
   the usage of this subroutine with similar grep commands as above.

6. Run the following tests:

prove t/db_dependent/Circulation/Branch.t
prove t/db_dependent/Circulation/SwitchOnSiteCheckouts.t
prove t/db_dependent/Circulation/TooMany.t

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/


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

2020-12-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112378|0   |1
is obsolete||

--- Comment #31 from Lari Taskula  ---
Created attachment 114419
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114419=edit
Bug 26814: Add onsite_checkout to Koha::CirculationRules

To test:
1. prove t/db_dependent/Koha/CirculationRules.t

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/


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

2020-12-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112377|0   |1
is obsolete||

--- Comment #30 from Lari Taskula  ---
Created attachment 114418
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114418=edit
Bug 26814: Schema changes

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/


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

2020-12-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112376|0   |1
is obsolete||

--- Comment #29 from Lari Taskula  ---
Created attachment 114417
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114417=edit
Bug 26814: Add a new column onsite_checkout to circulation_rules table

To add:
1. perl installer/data/mysql/updatedatabase.pl

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/


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

2020-12-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Joonas Kylmälä  changed:

   What|Removed |Added

 CC||joonas.kylm...@helsinki.fi
 Status|Needs Signoff   |Patch doesn't apply

--- Comment #28 from Joonas Kylmälä  ---
Doesn't apply anymore.

-- 
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/


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

2020-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

--- Comment #27 from Lari Taskula  ---
What options should circulation rules have for onsite-checkout?
Option 1:
"No"circulation_rules.onsite_checkout => 0
"Yes"   circulation_rules.onsite_checkout => 1

or

Option 2:
"All"   circulation_rules.onsite_checkout => undef
"No"circulation_rules.onsite_checkout => 0
"Yes"   circulation_rules.onsite_checkout => 1

The problem has to do with how we process circulation_rules scopes and the "*"
aka undef value.

1. With option 1 it becomes impossible to share rules for normal and on-site
checkouts and likely requires a lot of rule duplication. Also, how would we
handle cases where the value for onsite-checkout is not known as there is no
'*' rule? Just use the "No" option?

2. My reasoning for option 2 was that it would enable sharing of rules between
those two checkout types. For example, sharing a fine rule:

branch | onsite | ccode | itype | name| value
*  | *  | * | * | fine| 5
*  | 1  | * | * | renewalsallowed | 1
*  | 0  | * | * | renewalsallowed | 5

But it seems such flexibility is not supported by the current graphical user
interface because it just sets all the rules in that row for that scope, even
if you don't touch them (to test: simply create a new rule using a new scope
and press Save, and you will see all rule columns were added into
circulation_rules). So we cannot share the rules unless we do it directly in
the database. Not sure how it works in the upcoming GUI.

-- 
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/


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

2020-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112632|0   |1
is obsolete||

--- Comment #26 from Lari Taskula  ---
Created attachment 112653
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112653=edit
Bug 26814: (SMART-RULES GUI) Disable hold rules when on-site option selected

SMART-RULES GUI tag means that this patch will apply before Bug 15522.

To test:
1. Apply patch
2. Go to Circulation and fine rules in staff client
3. Observe the main circulation rules matrix, observe the following columns:

   Holds allowed (total)
   Holds allowed (daily)
   Holds per record (count)
   On shelf holds allowed
   OPAC item level holds
   Article requests

4. Set "On-site checkout" to "No" or "On-site"
5. Observe the columns in step 3, they should now be disabled
6. Set "On-site checkout" to "All"
7. Observe the columns in step 3, they should now be enabled
8. Add a new rule:

   On-site checkout: "On-site"
   Current checkouts allowed: 1

   and click Save.

9. Find the row you just added and press Edit.
10. Observe the columns in step 3, they should now be disabled
11. Press Edit for any other row where On-site checkout is "All"
12. Observe the columns in step 3, they should now be enabled

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/


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

2020-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112630|0   |1
is obsolete||

--- Comment #24 from Lari Taskula  ---
Created attachment 112651
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112651=edit
Bug 26814: (SMART-RULES GUI) Add onsite_checkout into user interface

SMART-RULES GUI tag means that this patch will apply before Bug 15522.

To test:
1. Go to Circulation rules page in Koha
2. Observe checkout type column in the rule matrix
3. Test circulation rules matrix by setting, modifying and deleting
   rules.
4. Test default checkout, hold and return policy settings.
5. Test default checkout, hold policy by patron category settings.

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/


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

2020-10-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112631|0   |1
is obsolete||

--- Comment #25 from Lari Taskula  ---
Created attachment 112652
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112652=edit
Bug 26814: (SMART-RULES GUI) Indent and add onsite_checkout to all_rules hash

SMART-RULES GUI tag means that this patch will apply before Bug 15522.

No other changes in this patch.

To test:
1. git diff --word-diff=color --ignore-all-space HEAD~1 --
koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt
2. Observe only $osc has been added

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/


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

2020-10-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112628|0   |1
is obsolete||

--- Comment #23 from Lari Taskula  ---
Created attachment 112632
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112632=edit
Bug 26814: (SMART-RULES GUI) Disable hold rules when on-site option selected

SMART-RULES GUI tag means that this patch will apply before Bug 15522.

To test:
1. Apply patch
2. Go to Circulation and fine rules in staff client
3. Observe the main circulation rules matrix, observe the following columns:

   Holds allowed (total)
   Holds allowed (daily)
   Holds per record (count)
   On shelf holds allowed
   OPAC item level holds
   Article requests

4. Set "On-site checkout" to "No" or "On-site"
5. Observe the columns in step 3, they should now be disabled
6. Set "On-site checkout" to "All"
7. Observe the columns in step 3, they should now be enabled
8. Add a new rule:

   On-site checkout: "On-site"
   Current checkouts allowed: 1

   and click Save.

9. Find the row you just added and press Edit.
10. Observe the columns in step 3, they should now be disabled
11. Press Edit for any other row where On-site checkout is "All"
12. Observe the columns in step 3, they should now be enabled

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/


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

2020-10-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112627|0   |1
is obsolete||

--- Comment #22 from Lari Taskula  ---
Created attachment 112631
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112631=edit
Bug 26814: (SMART-RULES GUI) Indent and add onsite_checkout to all_rules hash

SMART-RULES GUI tag means that this patch will apply before Bug 15522.

No other changes in this patch.

To test:
1. git diff --word-diff=color --ignore-all-space HEAD~1 --
koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt
2. Observe only $osc has been added

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/


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

2020-10-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112626|0   |1
is obsolete||

--- Comment #21 from Lari Taskula  ---
Created attachment 112630
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112630=edit
Bug 26814: (SMART-RULES GUI) Add onsite_checkout into user interface

SMART-RULES GUI tag means that this patch will apply before Bug 15522.

To test:
1. Go to Circulation rules page in Koha
2. Observe checkout type column in the rule matrix
3. Test circulation rules matrix by setting, modifying and deleting
   rules.
4. Test default checkout, hold and return policy settings.
5. Test default checkout, hold policy by patron category settings.

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/


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

2020-10-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112610|0   |1
is obsolete||

--- Comment #19 from Lari Taskula  ---
Created attachment 112627
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112627=edit
Bug 26814: (SMART-RULES GUI) Indent and add onsite_checkout to all_rules hash

SMART-RULES GUI tag means that this patch will apply before Bug 15522.

No other changes in this patch.

To test:
1. git diff --word-diff=color --ignore-all-space HEAD~1 --
koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt
2. Observe only $osc has been added

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/


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

2020-10-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112611|0   |1
is obsolete||

--- Comment #20 from Lari Taskula  ---
Created attachment 112628
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112628=edit
Bug 26814: (SMART-RULES GUI) Disable hold rules when on-site option selected

SMART-RULES GUI tag means that this patch will apply before Bug 15522.

To test:
1. Apply patch
2. Go to Circulation and fine rules in staff client
3. Observe the main circulation rules matrix, observe the following columns:

   Holds allowed (total)
   Holds allowed (daily)
   Holds per record (count)
   On shelf holds allowed
   OPAC item level holds
   Article requests

4. Set "On-site checkout" to "No" or "On-site"
5. Observe the columns in step 3, they should now be disabled
6. Set "On-site checkout" to "All"
7. Observe the columns in step 3, they should now be enabled
8. Add a new rule:

   On-site checkout: "On-site"
   Current checkouts allowed: 1

   and click Save.

9. Find the row you just added and press Edit.
10. Observe the columns in step 3, they should now be disabled
11. Press Edit for any other row where On-site checkout is "All"
12. Observe the columns in step 3, they should now be enabled

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/


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

2020-10-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112609|0   |1
is obsolete||

--- Comment #18 from Lari Taskula  ---
Created attachment 112626
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112626=edit
Bug 26814: (SMART-RULES GUI) Add onsite_checkout into user interface

SMART-RULES GUI tag means that this patch will apply before Bug 15522.

To test:
1. Go to Circulation rules page in Koha
2. Observe checkout type column in the rule matrix
3. Test circulation rules matrix by setting, modifying and deleting
   rules.
4. Test default checkout, hold and return policy settings.
5. Test default checkout, hold policy by patron category settings.

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/


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

2020-10-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112382|0   |1
is obsolete||

--- Comment #16 from Lari Taskula  ---
Created attachment 112624
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112624=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/


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

2020-10-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112381|0   |1
is obsolete||

--- Comment #15 from Lari Taskula  ---
Created attachment 112623
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112623=edit
Bug 26814: Add onsite_checkout to set_rules

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

grep --exclude-dir '.git' --exclude-dir 'misc/translator' \
--exclude-dir 'koha-tmpl' -Przo '(?s)(::|->)set_rules.*?\)' \
--exclude="smart-rules.pl" --exclude="smart-rules.tt" | \
grep -avz 'onsite_checkout' && echo ""

   The only occasions this should return anything are cases where
   a HASH or HASHref is given to set_rules(), 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)

2. Find all subroutines using set_rules()

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

   2.1 The only return should be
   t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t=401=
 sub set_holdallowed_rule {

3. The boring step. Find all occurrences of set_rules() with
   the following command:

grep --exclude-dir='.git' -Prn 'set_rules'

Go through this list and make sure all neccessary locations are
updated. A change is required when the rule scope includes
onsite_checkout. See Koha/CirculationRules.pm for scopes.
Hold/reserve related rules do not require it.

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/


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

2020-10-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112383|0   |1
is obsolete||

--- Comment #17 from Lari Taskula  ---
Created attachment 112625
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112625=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 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.
___
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/


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

2020-10-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112608|0   |1
is obsolete||

--- Comment #14 from Lari Taskula  ---
Created attachment 112611
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112611=edit
Bug 26814: (SMART-RULES GUI) Disable hold rules when on-site option selected

SMART-RULES GUI tag means that this patch will apply before Bug 15522.

To test:
1. Apply patch
2. Go to Circulation and fine rules in staff client
3. Observe the main circulation rules matrix, observe the following columns:

   Holds allowed (total)
   Holds allowed (daily)
   Holds per record (count)
   On shelf holds allowed
   OPAC item level holds
   Article requests

4. Set "On-site checkout" to "No" or "On-site"
5. Observe the columns in step 3, they should now be disabled
6. Set "On-site checkout" to "All"
7. Observe the columns in step 3, they should now be enabled
8. Add a new rule:

   On-site checkout: "On-site"
   Current checkouts allowed: 1

   and click Save.

9. Find the row you just added and press Edit.
10. Observe the columns in step 3, they should now be disabled
11. Press Edit for any other row where On-site checkout is "All"
12. Observe the columns in step 3, they should now be enabled

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/


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

2020-10-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112385|0   |1
is obsolete||

--- Comment #13 from Lari Taskula  ---
Created attachment 112610
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112610=edit
Bug 26814: (SMART-RULES GUI) Indent and add onsite_checkout to all_rules hash

SMART-RULES GUI tag means that this patch will apply before Bug 15522.

No other changes in this patch.

To test:
1. git diff --word-diff=color --ignore-all-space HEAD~1 --
koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt
2. Observe only $osc has been added

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/


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

2020-10-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

 Attachment #112384|0   |1
is obsolete||

--- Comment #12 from Lari Taskula  ---
Created attachment 112609
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112609=edit
Bug 26814: (SMART-RULES GUI) Add onsite_checkout into user interface

SMART-RULES GUI tag means that this patch will apply before Bug 15522.

To test:
1. Go to Circulation rules page in Koha
2. Observe checkout type column in the rule matrix
3. Test circulation rules matrix by setting, modifying and deleting
   rules.
4. Test default checkout, hold and return policy settings.
5. Test default checkout, hold policy by patron category settings.

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/


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

2020-10-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

 Blocks||24101


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24101
[Bug 24101] Due date to on-site loans according to the calendar and possibility
to renew on-site loans
-- 
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/


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

2020-10-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

--- Comment #11 from Lari Taskula  ---
Created attachment 112608
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112608=edit
Bug 26814: (SMART-RULES GUI) Disable hold rules when on-site option selected

To test:
1. Apply patch
2. Go to Circulation and fine rules in staff client
3. Observe the main circulation rules matrix, observe the following columns:

   Holds allowed (total)
   Holds allowed (daily)
   Holds per record (count)
   On shelf holds allowed
   OPAC item level holds
   Article requests

4. Set "On-site checkout" to "No" or "On-site"
5. Observe the columns in step 3, they should now be disabled
6. Set "On-site checkout" to "All"
7. Observe the columns in step 3, they should now be enabled
8. Add a new rule:

   On-site checkout: "On-site"
   Current checkouts allowed: 1

   and click Save.

9. Find the row you just added and press Edit.
10. Observe the columns in step 3, they should now be disabled
11. Press Edit for any other row where On-site checkout is "All"
12. Observe the columns in step 3, they should now be enabled

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/


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

2020-10-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

 Status|ASSIGNED|Needs Signoff

-- 
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/


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

2020-10-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

--- Comment #9 from Lari Taskula  ---
Created attachment 112384
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112384=edit
Bug 26814: (SMART-RULES GUI) Add onsite_checkout into user interface

SMART-RULES GUI tag means that this patch will apply before Bug 15522.

To test:
1. Go to Circulation rules page in Koha
2. Observe checkout type column in the rule matrix
3. Test circulation rules matrix by setting, modifying and deleting
   rules.
4. Test default checkout, hold and return policy settings.
5. Test default checkout, hold policy by patron category settings.

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/


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

2020-10-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

--- Comment #8 from Lari Taskula  ---
Created attachment 112383
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112383=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 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.
___
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/


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

2020-10-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

--- Comment #10 from Lari Taskula  ---
Created attachment 112385
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112385=edit
Bug 26814: (SMART-RULES GUI) Indent and add onsite_checkout to all_rules hash

SMART-RULES GUI tag means that this patch will apply before Bug 15522.

No other changes in this patch.

To test:
1. git diff --word-diff=color --ignore-all-space HEAD~1 --
koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt
2. Observe only $osc has been added

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/


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

2020-10-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

--- Comment #7 from Lari Taskula  ---
Created attachment 112382
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112382=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/


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

2020-10-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

--- Comment #5 from Lari Taskula  ---
Created attachment 112380
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112380=edit
Bug 26814: Add onsite_checkout to set_rule

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

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

2. Find all subroutines using set_rule()

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

   2.1 The only return should be
   Koha/CirculationRules.pm=331=sub set_rules {

3. The boring step. Find all occurrences of set_rule() with
   the following command:

grep --exclude-dir='.git' -Prn 'set_rule' | grep -v set_rules

   Go through this list and make sure all neccessary locations are
   updated. A change is required when the rule scope includes
   onsite_checkout. See Koha/CirculationRules.pm for scopes.
   Hold/reserve related rules do not require it.

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/


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

2020-10-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

--- Comment #6 from Lari Taskula  ---
Created attachment 112381
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112381=edit
Bug 26814: Add onsite_checkout to set_rules

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

grep --exclude-dir '.git' --exclude-dir 'misc/translator' \
--exclude-dir 'koha-tmpl' -Przo '(?s)(::|->)set_rules.*?\)' \
--exclude="smart-rules.pl" --exclude="smart-rules.tt" | \
grep -avz 'onsite_checkout' && echo ""

   The only occasions this should return anything are cases where
   a HASH or HASHref is given to set_rules(), 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)

2. Find all subroutines using set_rules()

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

   2.1 The only return should be
   t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t=401=
 sub set_holdallowed_rule {

3. The boring step. Find all occurrences of set_rules() with
   the following command:

grep --exclude-dir='.git' -Prn 'set_rules'

Go through this list and make sure all neccessary locations are
updated. A change is required when the rule scope includes
onsite_checkout. See Koha/CirculationRules.pm for scopes.
Hold/reserve related rules do not require it.

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/


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

2020-10-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

--- Comment #1 from Lari Taskula  ---
Created attachment 112376
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112376=edit
Bug 26814: Add a new column onsite_checkout to circulation_rules table

To add:
1. perl installer/data/mysql/updatedatabase.pl

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/


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

2020-10-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

--- Comment #4 from Lari Taskula  ---
Created attachment 112379
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112379=edit
Bug 26814: Remove on-site specific circulation rules

To apply:
1. perl installer/data/mysql/updatedatabase.pl

To test:
1. Search for patron_maxonsiteissueqty rule

   $ grep -rn 'patron_maxonsiteissueqty'

2. Observe no results in Koha source files (excluding .git, atomicupdates nor
   updatedatabase.pl, no release notes)
3. Search for maxonsiteissueqty rule

   $ grep -rn 'maxonsiteissueqty'

4. Observe no results (excluding .git, atomicupdates and updatedatabase.pl
   and release notes)
5. Check modification made to C4::Circulation::GetBranchBorrowerCircRule().
   Make sure the new parameter is being used everywhere. You can search
   the usage of this subroutine with similar grep commands as above.

6. Run the following tests:

prove t/db_dependent/Circulation/Branch.t
prove t/db_dependent/Circulation/SwitchOnSiteCheckouts.t
prove t/db_dependent/Circulation/TooMany.t

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/


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

2020-10-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

--- Comment #2 from Lari Taskula  ---
Created attachment 112377
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112377=edit
Bug 26814: Schema changes

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/


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

2020-10-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

--- Comment #3 from Lari Taskula  ---
Created attachment 112378
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112378=edit
Bug 26814: Add onsite_checkout to Koha::CirculationRules

To test:
1. prove t/db_dependent/Koha/CirculationRules.t

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/


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

2020-10-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

 CC||lari.task...@hypernova.fi
 Status|NEW |ASSIGNED
   Assignee|koha-b...@lists.koha-commun |lari.task...@hypernova.fi
   |ity.org |

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
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/


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

2020-10-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26814

Lari Taskula  changed:

   What|Removed |Added

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

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
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/