[Koha-bugs] [Bug 25112] Koha::CirculationRules->set_rules should handle scopes per rule

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Apr 11 20:00:30 CEST 2020


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

--- Comment #2 from Lari Taskula <lari.taskula at hypernova.fi> ---
Created attachment 102764
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102764&action=edit
Bug 25112: Make set_rules() handle rule scopes

Koha::CirculationRules->set_rules is currently too complicated to use.
Right now, in order to specify multiple rules at once, they must all
be rules that accept the same set of scopes. Otherwise we can get this
type of errors:

1/9 set_rule cannot set 'holds_per_record' for a 'checkout_type'!
  at t/db_dependent/Circulation/GetHardDueDate.t line 215.

Validating scopes at set_rule() is good, but set_rules() should examine
each rule and pass the correct scope to set_rule() instead of passing
all scopes to every rule like it is doing now.

To test:
1. prove t/db_dependent/Koha/CirculationRules.t
2. Observe success

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