[Koha-bugs] [Bug 33847] Database update replaces undefined rules with defaults rather than the value that would be used

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri May 26 17:49:35 CEST 2023


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

--- Comment #1 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 151764
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151764&action=edit
Bug 33847: Database update replaces undefined rules with defaults rather than
the value that would be used

Bug 29012 introduces a database update that sets the default values for rules
that are required but undefined. This functionally changes the results of the
circulation rules.

Instead, this update should find value that is being used for that rule combo
and use that as the rule value, only using the default in the case that the
derived rule doesn't exist or has a null value.

Test Plan:
1) Check out Koha 22.05.05
2) Create a default all/all/all rule, 3 other rules. Ensure they all have
issuelength set to 7, with one of the non-default rules having an issuelength
of 14.
3) Delete all but one of the non-default rules with the following query:
   Delete from circulation_rules where rule_name  = 'issuelength' and (
issuelength != 14 or ( branchcode is null and categorycode is null and itemtype
is null ) ) limit 2;
4) Check out Koha 22.05.06
4) Run updatedatabase.pl
5) Note the rules were recreated with the value 0
6) Repeat steps 1-4
7) Apply this patch
8) Run updatedatabase.pl
9) Note the rules were recreated, but the value is the derived value from the
all/all/all rule!

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


More information about the Koha-bugs mailing list