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

2024-01-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

Lucas Gass  changed:

   What|Removed |Added

 Version(s)|24.05.00,23.11.02   |24.05.00,23.11.02,23.05.08
released in||
 Status|Pushed to stable|Pushed to oldstable
 CC||lu...@bywatersolutions.com

--- Comment #27 from Lucas Gass  ---
Backported to 23.05.x for upcoming 23.05.08

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2024-01-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

Fridolin Somers  changed:

   What|Removed |Added

 Version(s)|24.05.00|24.05.00,23.11.02
released in||
 CC||fridolin.som...@biblibre.co
   ||m
 Status|Pushed to master|Pushed to stable

--- Comment #26 from Fridolin Somers  ---
Pushed to 23.11.x for 23.11.02

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-12-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

--- Comment #25 from Katrin Fischer  ---
Pushed for 24.05!

Well done everyone, thank you!

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-12-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

Katrin Fischer  changed:

   What|Removed |Added

 Status|Passed QA   |Pushed to master
 Version(s)||24.05.00
released in||

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-12-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

David Nind  changed:

   What|Removed |Added

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

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-12-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

--- Comment #24 from Marcel de Rooy  ---
Btw: does <=> work for MariaDB? Yes, see:
https://mariadb.com/kb/en/null-safe-equal

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-12-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

Marcel de Rooy  changed:

   What|Removed |Added

 Attachment #159410|0   |1
is obsolete||
 Attachment #159411|0   |1
is obsolete||

--- Comment #23 from Marcel de Rooy  ---
Created attachment 159428
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159428=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 Loan
period set to 7, with one of the non-default rules having a Loan period 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 (
rule_value != 14 and not ( branchcode is null and categorycode is null and
itemtype is null ) ) limit 2;
4) Check out 254f721320
5) Run updatedatabase.pl and restart
6) Note the rules were recreated with the value 0
7) Repeat steps 1-4
8) Apply this patch
9) If you're using the same database, set the version to 22.0600023 and restart
10) Run updatedatabase.pl
11) Note the rules were recreated, but the value is the derived value from the
all/all/all rule!

Signed-off-by: Kevin Carnes 

Signed-off-by: Marcel de Rooy 
Signed-off-by: Emily Lamancusa 

Bug 33847: Rewrite to use SQL

Signed-off-by: Emily Lamancusa 

Signed-off-by: Marcel de Rooy 
[EDIT] Squashed, and added reference to new bug too

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-12-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

Marcel de Rooy  changed:

   What|Removed |Added

 Status|BLOCKED |Passed QA

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-12-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

--- Comment #22 from Marcel de Rooy  ---
Looks good to me. Any particular reason why you replaced the original
suspension_chargeperiod by fine btw ?

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-12-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

--- Comment #21 from Marcel de Rooy  ---
Probably we should allow IFNULL in the mysql folder :)

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-12-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

--- Comment #20 from Marcel de Rooy  ---
 FAIL   installer/data/mysql/db_revs/220600024.pl
   FAIL   forbidden patterns
forbidden pattern: IFNULL (must be replaced by COALESCE) (line
33)

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-12-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

Marcel de Rooy  changed:

   What|Removed |Added

 Status|Signed Off  |BLOCKED

--- Comment #19 from Marcel de Rooy  ---
QA: Revisiting

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-11-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

Emily Lamancusa  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

--- Comment #18 from Emily Lamancusa  
---
> It occurs to me as I write this, though, that I only created rules that
> inherited from the All/All/All default rule, and didn't test that the values
> are derived from the *correct* rule if there are multiple related rules
> defined in the hierarchy. I'm going to test that case before I mark the bug
> as signed off.

Tested issuelength with the following rules:
 -
| Branch  | Patron category | Item type | issuelength |
 -
| CPL | Student | Reference | |
| CPL | Student | All   |  3  |
| CPL | All | Reference |  1  |
| CPL | All | All   |  5  |
 --
| All | Student | Reference | |
| All | Student | All   |  7  |
| All | All | Reference |  1  |
| All | All | All   |  5  |
 --

The missing CPL/Student/Reference value correctly inherited the CPL/Student/All
value of 3, and the missing All/Student/Reference value correctly inherited the
All/Student/All value of 7.

Marking as Signed off :)

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-11-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

Emily Lamancusa  changed:

   What|Removed |Added

 CC||emily.lamancusa@montgomeryc
   ||ountymd.gov

--- Comment #17 from Emily Lamancusa  
---
Testing notes:
Followed the test plan from the first patch. I also tested the other four
affected fields (hardduedate, unseen_renewals_allowed, rentaldiscount and
decreaseloanholds), and all fields were correctly filled with derived values.

It occurs to me as I write this, though, that I only created rules that
inherited from the All/All/All default rule, and didn't test that the values
are derived from the *correct* rule if there are multiple related rules defined
in the hierarchy. I'm going to test that case before I mark the bug as signed
off.

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-11-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

Emily Lamancusa  changed:

   What|Removed |Added

 Attachment #159087|0   |1
is obsolete||

--- Comment #16 from Emily Lamancusa  
---
Created attachment 159411
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159411=edit
Bug 33847: Rewrite to use SQL

Signed-off-by: Emily Lamancusa 

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-11-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

Emily Lamancusa  changed:

   What|Removed |Added

 Attachment #152613|0   |1
is obsolete||

--- Comment #15 from Emily Lamancusa  
---
Created attachment 159410
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159410=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 Loan
period set to 7, with one of the non-default rules having a Loan period 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 (
rule_value != 14 and not ( branchcode is null and categorycode is null and
itemtype is null ) ) limit 2;
4) Check out 254f721320
5) Run updatedatabase.pl and restart
6) Note the rules were recreated with the value 0
7) Repeat steps 1-4
8) Apply this patch
9) If you're using the same database, set the version to 22.0600023 and restart
10) Run updatedatabase.pl
11) Note the rules were recreated, but the value is the derived value from the
all/all/all rule!

Signed-off-by: Kevin Carnes 

Signed-off-by: Marcel de Rooy 
Signed-off-by: Emily Lamancusa 

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-11-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

--- Comment #14 from Kevin Carnes  ---
Created attachment 159087
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159087=edit
Bug 33847: Rewrite to use SQL

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-11-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

Kevin Carnes  changed:

   What|Removed |Added

 Status|Failed QA   |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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-07-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

--- Comment #13 from Tomás Cohen Arazi  ---
(In reply to David Cook from comment #11)
> (In reply to Kyle M Hall from comment #10)
> > (In reply to Tomás Cohen Arazi from comment #6)
> > > We shouldn't be using our business classes on the DBRev, as they can 
> > > change
> > > in the future and thus break this DBRev.
> > 
> > I'm reading this as using DBIC directly is ok. Is that correct?
> 
> I agree that we shouldn't be using business classes in the DBRev. 
> 
> I think that DBIC directly should be OK so long as only core functionality
> is used. (A number of DBIC classes like Suggestion.pm, Itemtype.pm,
> ErmAgreement.pm, et cetera have additional code added after "DO NOT MODIFY
> THIS OR ANYTHING ABOVE", which is added logic and not drawn directly from
> the database.)

There will always be risks using the generated model as well. Let's stick to
plain SQL.

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-07-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

--- Comment #12 from Tomás Cohen Arazi  ---
(In reply to Katrin Fischer from comment #9)
> So does this mean we need to find a way to do the fix only using SQL?

(In reply to Kyle M Hall from comment #10)
> I'm reading this as using DBIC directly is ok. Is that correct?

Use PLAIN SQL.

Best regards

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-07-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

--- Comment #11 from David Cook  ---
(In reply to Kyle M Hall from comment #10)
> (In reply to Tomás Cohen Arazi from comment #6)
> > We shouldn't be using our business classes on the DBRev, as they can change
> > in the future and thus break this DBRev.
> 
> I'm reading this as using DBIC directly is ok. Is that correct?

I agree that we shouldn't be using business classes in the DBRev. 

I think that DBIC directly should be OK so long as only core functionality is
used. (A number of DBIC classes like Suggestion.pm, Itemtype.pm,
ErmAgreement.pm, et cetera have additional code added after "DO NOT MODIFY THIS
OR ANYTHING ABOVE", which is added logic and not drawn directly from the
database.)

In the past, Ruby on Rails used to warn about using models in DB migrations but
those warnings appear to have disappeared from recent documentation:
https://guides.rubyonrails.org/v3.2/migrations.html#using-models-in-your-migrations

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-07-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

--- Comment #10 from Kyle M Hall  ---
(In reply to Tomás Cohen Arazi from comment #6)
> We shouldn't be using our business classes on the DBRev, as they can change
> in the future and thus break this DBRev.

I'm reading this as using DBIC directly is ok. Is that correct?

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-06-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

--- Comment #9 from Katrin Fischer  ---
So does this mean we need to find a way to do the fix only using SQL?

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-06-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

--- Comment #8 from Katrin Fischer  ---
This goes as far back as 21.11.12 - we should fix asap.

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-06-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

--- Comment #7 from Marcel de Rooy  ---
(In reply to Tomás Cohen Arazi from comment #6)
> We shouldn't be using our business classes on the DBRev, as they can change
> in the future and thus break this DBRev.

Good point

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-06-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Status|Passed QA   |Failed QA

--- Comment #6 from Tomás Cohen Arazi  ---
We shouldn't be using our business classes on the DBRev, as they can change in
the future and thus break this DBRev.

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-06-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

Marcel de Rooy  changed:

   What|Removed |Added

 CC||tomasco...@gmail.com

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-06-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

Marcel de Rooy  changed:

   What|Removed |Added

 QA Contact|testo...@bugs.koha-communit |m.de.r...@rijksmuseum.nl
   |y.org   |

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-06-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

--- Comment #5 from Marcel de Rooy  ---
This looks good to me for installs that did not yet pass the dbrev.
But what about installs that already got some wrong values? Could we warn or do
something in a new dbrev too ?

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-06-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

Marcel de Rooy  changed:

   What|Removed |Added

 Attachment #152339|0   |1
is obsolete||

--- Comment #4 from Marcel de Rooy  ---
Created attachment 152613
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152613=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 Loan
period set to 7, with one of the non-default rules having a Loan period 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 (
rule_value != 14 and not ( branchcode is null and categorycode is null and
itemtype is null ) ) limit 2;
4) Check out 254f721320
5) Run updatedatabase.pl and restart
6) Note the rules were recreated with the value 0
7) Repeat steps 1-4
8) Apply this patch
9) If you're using the same database, set the version to 22.0600023 and restart
10) Run updatedatabase.pl
11) Note the rules were recreated, but the value is the derived value from the
all/all/all rule!

Signed-off-by: Kevin Carnes 

Signed-off-by: Marcel de Rooy 

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-06-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

Marcel de Rooy  changed:

   What|Removed |Added

 Status|BLOCKED |Passed QA
   Patch complexity|--- |Small patch

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-06-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

Marcel de Rooy  changed:

   What|Removed |Added

 CC||m.de.r...@rijksmuseum.nl
 Status|Signed Off  |BLOCKED

--- Comment #3 from Marcel de Rooy  ---
QA: Looking here

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-06-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

Kevin Carnes  changed:

   What|Removed |Added

 Attachment #151764|0   |1
is obsolete||

--- Comment #2 from Kevin Carnes  ---
Created attachment 152339
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152339=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 Loan
period set to 7, with one of the non-default rules having a Loan period 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 (
rule_value != 14 and not ( branchcode is null and categorycode is null and
itemtype is null ) ) limit 2;
4) Check out 254f721320
5) Run updatedatabase.pl and restart
6) Note the rules were recreated with the value 0
7) Repeat steps 1-4
8) Apply this patch
9) If you're using the same database, set the version to 22.0600023 and restart
10) Run updatedatabase.pl
11) Note the rules were recreated, but the value is the derived value from the
all/all/all rule!

Signed-off-by: Kevin Carnes 

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-06-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

Kevin Carnes  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-05-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

Kyle M Hall  changed:

   What|Removed |Added

   Severity|major   |critical

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-05-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

David Cook  changed:

   What|Removed |Added

 CC||dc...@prosentient.com.au

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-05-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

Kyle M Hall  changed:

   What|Removed |Added

   Assignee|koha-b...@lists.koha-commun |k...@bywatersolutions.com
   |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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-05-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

--- Comment #1 from Kyle M Hall  ---
Created attachment 151764
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151764=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.
___
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-05-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

Kyle M Hall  changed:

   What|Removed |Added

 Status|NEW |Needs Signoff

-- 
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 33847] Database update replaces undefined rules with defaults rather than the value that would be used

2023-05-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847

Kyle M Hall  changed:

   What|Removed |Added

 Depends on||29012


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012
[Bug 29012] Some rules are not saved when left blank while editing a 'rule'
line in smart-rules.pl
-- 
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/