[Koha-bugs] [Bug 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

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

Kyle M Hall  changed:

   What|Removed |Added

 Blocks||33847


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33847
[Bug 33847] Database update replaces undefined rules with defaults rather than
the value that would be used
-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

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

Nick Clemens  changed:

   What|Removed |Added

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

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Jonathan Druart  changed:

   What|Removed |Added

 Version(s)|22.11.00,22.11.00,22.05.06, |22.11.00,22.05.06,21.11.12
released in|21.11.12|

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #56 from Arthur Suzuki  ---
sorry koha-release updatebz script did update that one but it actually has been
reverted.

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

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

--- Comment #55 from Nick Clemens  ---
(In reply to Arthur Suzuki from comment #54)
> Thanks!
> 
> Pushed to 21.11 for 21.11.12

This was reverted from 22.05, I think we should not backport this one

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

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

Katrin Fischer  changed:

   What|Removed |Added

 Version(s)|22.11.00,22.11.00,21.11,|22.11.00,22.11.00,22.05.06,
released in|22.05.06|21.11.12

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Arthur Suzuki  changed:

   What|Removed |Added

 Status|Pushed to stable|Pushed to oldstable

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Arthur Suzuki  changed:

   What|Removed |Added

 Status|Pushed to master|Pushed to stable
 CC||arthur.suz...@biblibre.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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #54 from Arthur Suzuki  ---
Thanks!

Pushed to 21.11 for 21.11.12

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Arthur Suzuki  changed:

   What|Removed |Added

 Version(s)|22.11.00,22.11.00, 22.05.06 |22.11.00,22.11.00,21.11,
released in||22.05.06

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #53 from Tomás Cohen Arazi  ---
Pushed to master for 22.11.

Nice work everyone, thanks!

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Version(s)|22.11.00, 22.05.06  |22.11.00,22.11.00, 22.05.06
released in||
 Status|Passed QA   |Pushed to master

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #52 from Tomás Cohen Arazi  ---
Created attachment 142249
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142249=edit
Bug 29012: Fix undef warnings around unseen_renewals_allowed in smart-rules.pl

Trivial fix.

To reproduce:
1. Create or edit a rule on /cgi-bin/koha/admin/smart-rules.pl - i.e. submit
the form (make POST request)
2. Notice the mentioned above warning in plack-intranet-error.log
3. Apply the patch.
4. Repeat step 1.
5. That warning in log file should be no more.

Signed-off-by: Tomas Cohen Arazi 

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #51 from Tomás Cohen Arazi  ---
Created attachment 142248
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142248=edit
Bug 29012: Fix existing update to prevent inserting incorrect data

Both updates now rely on 'suspension_chargeperiod' as the source of truth
for existence of a rule. Spot checking some existing production databases this
seems to be acceptable.

This alters the update to only add rules where a 'suspension_chargeperiod' rule
exists
and a value for the rule is not already set.

NOTE: While the table has a unique key:
UNIQUE KEY `branchcode` (`branchcode`,`categorycode`,`itemtype`,`rule_name`),

This key doesn't prevent duplicates on NULLs, i.e.:

branchcode  | categorycode  | itemtype  | rule_name |
rule_value
NULL| NULL  | BK| unseen_renewals_allowed   | 1
NULL| NULL  | BK| unseen_renewals_allowed   | 2
NULL| NULL  | BK| unseen_renewals_allowed   | 3

So we need to both check that any rule is present and that the specific rule is
not.
The 'INSERT IGNORE' won't IGNORE existing values except for the most specific
rules

Test plan:
 0 - Edit and save existing default rule in DB (sample data does not include
suspension_chargeperiod)
 1 - Set some rules for "Default checkout, hold and return policy" for
"Standard rule" and some specific libraries
 2 - cp installer/data/mysql/db_revs/220600024.pl
installer/data/mysql/atomicupdate/
 3 - SELECT * FROM circulation rules, note the number of rules that exist
 4 - updatedatabase
 5 - Check the DB again, you should now have rules as described in the bug
 i.e. You will have 5 new rules per 'Default checkout, hold and return
policy'
 6 - apply 1st patch on bug
 7 - rm installer/data/mysql/atomicupdate/220600024.pl (so we don't add again)
 8 - updatedatabase
 9 - Check DB, the extra rules have been deleted
10 - Apply 2nd patch
11 - cp installer/data/mysql/db_revs/220600024.pl
installer/data/mysql/atomicupdate/
12 - rm installer/data/mysql/atomicupdate/bug_31727.pl (so we can confirm
update isn't adding rules)
13 - updatedatabase
14 - Confirm no change in rules since step 9
15 - git reset --hard (get deleted update back)
16 - rm installer/data/mysql/atomicupdate/220600024.pl

Signed-off-by: Nick Clemens 
Signed-off-by: Tomas Cohen Arazi 

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Status|Signed Off  |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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Attachment #141951|0   |1
is obsolete||

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Attachment #141952|0   |1
is obsolete||

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Tomás Cohen Arazi  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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #50 from Kevin Carnes  ---
Created attachment 141952
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141952=edit
Bug 29012: Fix undef warnings around unseen_renewals_allowed in smart-rules.pl

Trivial fix.

To reproduce:
1. Create or edit a rule on /cgi-bin/koha/admin/smart-rules.pl - i.e. submit
the form (make POST request)
2. Notice the mentioned above warning in plack-intranet-error.log
3. Apply the patch.
4. Repeat step 1.
5. That warning in log file should be no more.

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #49 from Kevin Carnes  ---
Created attachment 141951
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141951=edit
Bug 29012: Fix existing update to prevent inserting incorrect data

Both updates now rely on 'suspension_chargeperiod' as the source of truth
for existence of a rule. Spot checking some existing production databases this
seems to be acceptable.

This alters the update to only add rules where a 'suspension_chargeperiod' rule
exists
and a value for the rule is not already set.

NOTE: While the table has a unique key:
UNIQUE KEY `branchcode` (`branchcode`,`categorycode`,`itemtype`,`rule_name`),

This key doesn't prevent duplicates on NULLs, i.e.:

branchcode  | categorycode  | itemtype  | rule_name |
rule_value
NULL| NULL  | BK| unseen_renewals_allowed   | 1
NULL| NULL  | BK| unseen_renewals_allowed   | 2
NULL| NULL  | BK| unseen_renewals_allowed   | 3

So we need to both check that any rule is present and that the specific rule is
not.
The 'INSERT IGNORE' won't IGNORE existing values except for the most specific
rules

Test plan:
 0 - Edit and save existing default rule in DB (sample data does not include
suspension_chargeperiod)
 1 - Set some rules for "Default checkout, hold and return policy" for
"Standard rule" and some specific libraries
 2 - cp installer/data/mysql/db_revs/220600024.pl
installer/data/mysql/atomicupdate/
 3 - SELECT * FROM circulation rules, note the number of rules that exist
 4 - updatedatabase
 5 - Check the DB again, you should now have rules as described in the bug
 i.e. You will have 5 new rules per 'Default checkout, hold and return
policy'
 6 - apply 1st patch on bug
 7 - rm installer/data/mysql/atomicupdate/220600024.pl (so we don't add again)
 8 - updatedatabase
 9 - Check DB, the extra rules have been deleted
10 - Apply 2nd patch
11 - cp installer/data/mysql/db_revs/220600024.pl
installer/data/mysql/atomicupdate/
12 - rm installer/data/mysql/atomicupdate/bug_31727.pl (so we can confirm
update isn't adding rules)
13 - updatedatabase
14 - Confirm no change in rules since step 9
15 - git reset --hard (get deleted update back)
16 - rm installer/data/mysql/atomicupdate/220600024.pl

Signed-off-by: Nick Clemens 

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Kevin Carnes  changed:

   What|Removed |Added

 Attachment #141869|0   |1
is obsolete||

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Kevin Carnes  changed:

   What|Removed |Added

 Attachment #138309|1   |0
is obsolete||

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Kevin Carnes  changed:

   What|Removed |Added

 Attachment #141879|0   |1
is obsolete||

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Kevin Carnes  changed:

   What|Removed |Added

 Attachment #141878|0   |1
is obsolete||

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Kevin Carnes  changed:

   What|Removed |Added

 Attachment #141877|0   |1
is obsolete||

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Kevin Carnes  changed:

   What|Removed |Added

 Attachment #141876|0   |1
is obsolete||

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Kevin Carnes  changed:

   What|Removed |Added

 Attachment #138310|1   |0
is obsolete||

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Kevin Carnes  changed:

   What|Removed |Added

 Attachment #141869|1   |0
is obsolete||

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #48 from Nick Clemens  ---
(In reply to Kevin Carnes from comment #46)
> (In reply to Nick Clemens from comment #45)
> > As we have time before release, and we have fixes - do we need to revert, or
> > can we just fix the DB updates here and push those?
> 
> I think just fixing the DB updates here should be fine. Perhaps I
> misunderstood that this would be reverted
> (https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31727#c14). Since
> it hasn't been reverted yet, perhaps it's still possible to cancel the
> revert and just fix it here.

Hi Kevin, 

Yes, please remove the revert patches and replace the original patches, along
with a new patch to fix the DB update as a followup

The code was reverted from stable - and i suggest we don't backport even after
the fix

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Tomás Cohen Arazi  changed:

   What|Removed |Added

 CC||tomasco...@gmail.com

--- Comment #47 from Tomás Cohen Arazi  ---
(In reply to Kevin Carnes from comment #46)
> (In reply to Nick Clemens from comment #45)
> > As we have time before release, and we have fixes - do we need to revert, or
> > can we just fix the DB updates here and push those?
> 
> I think just fixing the DB updates here should be fine. Perhaps I
> misunderstood that this would be reverted
> (https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31727#c14). Since
> it hasn't been reverted yet, perhaps it's still possible to cancel the
> revert and just fix it here.

Can you provide a fix? Thanks!

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #46 from Kevin Carnes  ---
(In reply to Nick Clemens from comment #45)
> As we have time before release, and we have fixes - do we need to revert, or
> can we just fix the DB updates here and push those?

I think just fixing the DB updates here should be fine. Perhaps I misunderstood
that this would be reverted
(https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31727#c14). Since it
hasn't been reverted yet, perhaps it's still possible to cancel the revert and
just fix it 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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #45 from Nick Clemens  ---
As we have time before release, and we have fixes - do we need to revert, or
can we just fix the DB updates here and push those?

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #44 from Slava Shishkin  ---
Good, thanks.

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #43 from Kevin Carnes  ---
(In reply to Slava Shishkin from comment #37)
> Kevin, I have conflicts applying to the current master. Can you check?

I added some revert patches. They can be removed when no longer needed.
Otherwise I can make a patch that works with the patch already in master.

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Kevin Carnes  changed:

   What|Removed |Added

 Attachment #141869|0   |1
is obsolete||

--- Comment #42 from Kevin Carnes  ---
Created attachment 141879
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141879=edit
Bug 29012: Add default values for blank circulation rules that weren't saved to
the database

There are 5 fields that are not set if no value is provided when saving/editing
a rule in Administration->Circulation and fines rules
- issuelength
- hardduedate
- unseenrenewalsallowed
- rentaldiscount
- decreaseloanholds

This is problematic because it gives the impression these rules are set as
blank, but in reality they don't exist and the rule will fal back to the higher
level

To test:
1 - Set a rule for
Patron category: Teacher
Itemtype: All
Hard due date: (Today)
Lona period: 10
2 - Set a rule for
Patron category: Teacher
Itemtype: Books
Hard due date: (leave blank)
Loan period: 10
3 - Expected behaviour is Book item will checkout to teacher for 10 days, all
other types will be due yesterday at 25:59:00
4 - Checkout an non-book item type to teacher
5 - Hard due date applies
6 - Checkout a 'book' item type to teacher
7 - Hard due date applies - FAIL

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #41 from Kevin Carnes  ---
Created attachment 141878
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141878=edit
Revert "Bug 29012: Add default values for blank circulation rules that weren't
saved to the database"

This reverts commit cf397ac3bcbc93a508954c836d1cb90a84fb2ac6.

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #40 from Kevin Carnes  ---
Created attachment 141877
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141877=edit
Revert "Bug 29012: (QA follow-up) Use q{} instead of '' in smart-rules.pl"

This reverts commit 6f8e77b4e899d6f71fb8987975ba916a65dc8229.

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #39 from Kevin Carnes  ---
Created attachment 141876
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141876=edit
Revert "Bug 29012: DBRev 22.06.00.024"

This reverts commit 51cef8c0ec1eca244ebafb853a9164bde65941cb.

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #38 from Andrew Nugged  ---
Slava/Kevin: I think it's because Tomás not yet reverted the master from old
29012.

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Slava Shishkin  changed:

   What|Removed |Added

 CC||slavashish...@gmail.com

--- Comment #37 from Slava Shishkin  ---
Kevin, I have conflicts applying to the current master. Can you check?

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #36 from Kevin Carnes  ---
(In reply to Andrew Nugged from comment #33)
> ok, so everything what was done above this message is OBSOLETE now,
> 
> Kevin Carnes, are you ok with committing here new solution from base?
> 
> (please mind the patches if something were useful in Bug 31727 too).

Ok, now the patch includes all the changes including bugs 31727 and 31737, but
without the new atomic update.

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Kevin Carnes  changed:

   What|Removed |Added

 Attachment #138309|0   |1
is obsolete||
 Attachment #138310|0   |1
is obsolete||

--- Comment #35 from Kevin Carnes  ---
Created attachment 141869
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141869=edit
Bug 29012: Add default values for blank circulation rules that weren't saved to
the database

There are 5 fields that are not set if no value is provided when saving/editing
a rule in Administration->Circulation and fines rules
- issuelength
- hardduedate
- unseenrenewalsallowed
- rentaldiscount
- decreaseloanholds

This is problematic because it gives the impression these rules are set as
blank, but in reality they don't exist and the rule will fal back to the higher
level

To test:
1 - Set a rule for
Patron category: Teacher
Itemtype: All
Hard due date: (Today)
Lona period: 10
2 - Set a rule for
Patron category: Teacher
Itemtype: Books
Hard due date: (leave blank)
Loan period: 10
3 - Expected behaviour is Book item will checkout to teacher for 10 days, all
other types will be due yesterday at 25:59:00
4 - Checkout an non-book item type to teacher
5 - Hard due date applies
6 - Checkout a 'book' item type to teacher
7 - Hard due date applies - FAIL

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Kevin Carnes  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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #34 from Lucas Gass  ---
This patchset has been reverted from 22.05.x

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Andrew Nugged  changed:

   What|Removed |Added

 Status|Pushed to stable|ASSIGNED

--- Comment #33 from Andrew Nugged  ---
ok, so everything what was done above this message is OBSOLETE now,

Kevin Carnes, are you ok with committing here new solution from base?

(please mind the patches if something were useful in Bug 31727 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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Andrew Nugged  changed:

   What|Removed |Added

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

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Andrew Nugged  changed:

   What|Removed |Added

 Depends on|31727   |


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31727
[Bug 31727] Orphan records in circulation_rules and false positives after
attempt to fix values to be empty or zeroes instead of missing
-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012
Bug 29012 depends on bug 31727, which changed state.

Bug 31727 Summary: Orphan records in circulation_rules and false positives 
after attempt to fix values to be empty or zeroes instead of missing
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31727

   What|Removed |Added

 Status|Needs Signoff   |RESOLVED
 Resolution|--- |INVALID

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #32 from Victor Grousset/tuxayo  ---
22.05 and 21.11 rmaints got and email about reverting this

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Victor Grousset/tuxayo  changed:

   What|Removed |Added

 CC||vic...@tuxayo.net

--- Comment #31 from Victor Grousset/tuxayo  ---
> Please create a new blocker bug, as this has already been released!

This hasn't been released. 22.05.06 is due for this month.

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Slava Shishkin  changed:

   What|Removed |Added

 Blocks||31737


Referenced Bugs:

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

2022-10-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Andrew Nugged  changed:

   What|Removed |Added

 Depends on||31727


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31727
[Bug 31727] Orphan records in circulation_rules and false positives after
attempt to fix values to be empty or zeroes instead of missing
-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #30 from Andrew Nugged  ---
(In reply to Katrin Fischer from comment #28)

> Please create a new blocker bug, as this has already been released!

yes, creating

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #29 from Andrew Nugged  ---
and another bad thing:

   unseen_renewals_allowed
vs
   unseenrenewalsallowed

(sic!)

we have 'unseen_renewals_allowed' everywhere in codebase, except in this atomic
update we have 'unseenrenewalsallowed'. And now DB is polluted even more :).

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #28 from Katrin Fischer  ---
(In reply to Andrew Nugged from comment #27)
> so we need now to make new ticket & new atomic update for those affected to
> HEAL orphan rules from database (pretty complicated task as I see, btw).

Please create a new blocker bug, as this has already been released!

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #27 from Andrew Nugged  ---
so we need now to make new ticket & new atomic update for those affected to
HEAL orphan rules from database (pretty complicated task as I see, 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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #26 from Andrew Nugged  ---
Those who installed this on production will get issues with the
circulation_rules table because of atomic update. So:


On smart-rules.pl (Home > Administration > Circulation and fine rules):
we have 5 tables:

1. Defining circulation and fine rules for all libraries
   (... for XXX branch, if branch selected)
2. Default checkout, hold and return policy
   (... for XXX branch, if branch selected)
3. Checkout, hold policy by patron category 
   (... for XXX branch, if branch selected)
4. Lost item fee refund on return policy
   (... for XXX branch, if branch selected)
5. Holds policy by item type
   (... for XXX branch, if branch selected)

and with dropdown, we can select rules for "Standard rules for all libraries"
or switch to ANY of the available branches represented by the whole page.

THE ISSUE:

... and this atomic update was intended to add "empty strings" and "zeroes" to:
issuelength, hardduedate, unseenrenewalsallowed, rentaldiscount,
decreaseloanholds values,

and the intention of atomuc update looks like was to select ANY combination of
branch/itemtype/category of else in DB, then for those, we should add those
"zeroes" and "empty strings". Like it was "some rows in table 1 if only, then
we add empty/zeroes".

But those "any combination" also covers rules belonging NOT just to table 1 but
also to tables 2..5, so if you don't have any rule for BRANCH in table 1 but
you had something for the branch in tables 2,3,4,5 this atomic update adds
orphan values for 'issuelength', 'hardduedate', 'unseenrenewalsallowed',
'rentaldiscount', 'decreaseloanholds'.

And, EVEN WORSE: because those rules even will not be shown for the operator as
RULES in table 1, but they still affect the results in circulation analysis as
bigger priority rules than those without branches (i.e. "*"/all) so zero or ''
value will be used as rule result for calculations.

And nothing will be shown to the operator (!!!).

For example, we just had on our production having "issuedate" "0" for some
branches added by this atomic update because those branches had 'holdallowed'
settings in table 5 (but nothing in table 1 in that per-branch-page!). But rule
became efficient for all requests and made a real mess when borrowers had
"today" issue return date & loan length (!!!). More complexity: this now can be
fixed only by manually removing trash from circulation_rules but requires
analysis, argh!

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-10-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Andrew Nugged  changed:

   What|Removed |Added

 CC||nug...@gmail.com

--- Comment #25 from Andrew Nugged  ---
DANGER!!! ALERT!!!
The atomic update FILLS database for BRANCHES rules which not existed before,
and values take precedence but are still hidden from the operator!

for example, if you had holdallowed for some branch set up, that is table 5 on
the page, not 1st, after the atomic update, you will have hidden issuedate=0
for 1st table, and the operator never will notice this until it gets into the
raw database.
But a single value of issuedate=0 will become applied OVER "all" branches rules
because branches have higher precedence.

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-09-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Lucas Gass  changed:

   What|Removed |Added

 Version(s)|22.11.00|22.11.00, 22.05.06
released in||
 Status|Pushed to master|Pushed to stable

--- Comment #24 from Lucas Gass  ---
Backported to 22.05.x for 22.05.06

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-07-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Kyle M Hall  changed:

   What|Removed |Added

 Status|Signed Off  |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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-07-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Kyle M Hall  changed:

   What|Removed |Added

 Attachment #138140|0   |1
is obsolete||

--- Comment #21 from Kyle M Hall  ---
Created attachment 138309
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138309=edit
Bug 29012: Add default values for blank circulation rules that weren't saved to
the database

There are 5 fields that are not set if no value is provided when saving/editing
a rule in Administration->Circulation and fines rules
- issuelength
- hardduedate
- unseenrenewalsallowed
- rentaldiscount
- decreaseloanholds

This is problematic because it gives the impression these rules are set as
blank, but in reality they don't exist and the rule will fal back to the higher
level

To test:
1 - Set a rule for
Patron category: Teacher
Itemtype: All
Hard due date: (Today)
Lona period: 10
2 - Set a rule for
Patron category: Teacher
Itemtype: Books
Hard due date: (leave blank)
Loan period: 10
3 - Expected behaviour is Book item will checkout to teacher for 10 days, all
other types will be due yesterday at 25:59:00
4 - Checkout an non-book item type to teacher
5 - Hard due date applies
6 - Checkout a 'book' item type to teacher
7 - Hard due date applies - FAIL

Signed-off-by: Caroline Cyr La Rose 

Signed-off-by: Kyle M Hall 

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-07-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Tomás Cohen Arazi  changed:

   What|Removed |Added

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

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-07-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #23 from Tomás Cohen Arazi  ---
Pushed to master for 22.11.

Nice work everyone, thanks!

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-07-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #22 from Kyle M Hall  ---
Created attachment 138310
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138310=edit
Bug 29012 (QA follow-up) Use q{} instead of '' in smart-rules.pl

Signed-off-by: Kyle M Hall 

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-07-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Victor Grousset/tuxayo  changed:

   What|Removed |Added

   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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-07-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Kyle M Hall  changed:

   What|Removed |Added

 CC||k...@bywatersolutions.com
 QA Contact|testo...@bugs.koha-communit |k...@bywatersolutions.com
   |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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-07-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Caroline Cyr La Rose  changed:

   What|Removed |Added

 Attachment #135194|0   |1
is obsolete||

--- Comment #19 from Caroline Cyr La Rose  ---
Created attachment 138140
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138140=edit
Bug 29012: Add default values for blank circulation rules that weren't saved to
the database

There are 5 fields that are not set if no value is provided when saving/editing
a rule in Administration->Circulation and fines rules
- issuelength
- hardduedate
- unseenrenewalsallowed
- rentaldiscount
- decreaseloanholds

This is problematic because it gives the impression these rules are set as
blank, but in reality they don't exist and the rule will fal back to the higher
level

To test:
1 - Set a rule for
Patron category: Teacher
Itemtype: All
Hard due date: (Today)
Lona period: 10
2 - Set a rule for
Patron category: Teacher
Itemtype: Books
Hard due date: (leave blank)
Loan period: 10
3 - Expected behaviour is Book item will checkout to teacher for 10 days, all
other types will be due yesterday at 25:59:00
4 - Checkout an non-book item type to teacher
5 - Hard due date applies
6 - Checkout a 'book' item type to teacher
7 - Hard due date applies - FAIL

Signed-off-by: Caroline Cyr La Rose 

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-07-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Caroline Cyr La Rose  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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-07-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #18 from Caroline Cyr La Rose  ---
Sigh. I was able to reproduce the original behaviour in a fresh sandbox, but
even after applying the patch in the sandbox, the behaviour stayed the same...
I will try on my dev install

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-07-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #20 from Caroline Cyr La Rose  ---
It worked on my local installation :)

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-07-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #17 from Kevin Carnes  ---
(In reply to Caroline Cyr La Rose from comment #16)
> I tried to test, but I am unable to get the original "problematic" behaviour.
> 
> My rules are as follows:
> Patron category: Teacher
> Item type: Books
> Current checkouts allowed: 10
> Current on-site checkouts allowed: 10
> Loan period: 10
> Hard due date: None defined
> (I didn't fill out anything else)
> 
> Patron category: Teacher
> Item type: All
> Current checkouts allowed: 10
> Current on-site checkouts allowed: 10
> Loan period: 10
> Hard due date : Exactly on 2022-06-30
> (I didn't fill out anything else)
> 
> I also have the All/All rule that comes with a sandbox
> Patron category: All
> Item type: All
> Current checkouts allowed: 5
> Current on-site checkouts allowed: 5
> Loan period: 5
> Hard due date: None defined
> (etc.)
> 
> I checked out 303857 (item-level itype = Music) to 23529000139858,
> and the due date was 2022-06-30 (today)
> I checked out 310114 (item-level itype = Books) to the same patron
> and the due date was 2022-07-10 (ten days from now)
> 
> I'm not sure what I did differently than the test plan.

I tested this on the master branch and received the hard due date for both
items. Was the patch for this bug ever applied on the sandbox? If the rules
were created when the patch was applied, that would explain your results.

You can try deleting the teacher rules and adding them again. You can also try
testing it on another sandbox without any patches.

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

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

Caroline Cyr La Rose  changed:

   What|Removed |Added

 CC||caroline.cyr-la-rose@inlibr
   ||o.com

--- Comment #16 from Caroline Cyr La Rose  ---
I tried to test, but I am unable to get the original "problematic" behaviour.

My rules are as follows:
Patron category: Teacher
Item type: Books
Current checkouts allowed: 10
Current on-site checkouts allowed: 10
Loan period: 10
Hard due date: None defined
(I didn't fill out anything else)

Patron category: Teacher
Item type: All
Current checkouts allowed: 10
Current on-site checkouts allowed: 10
Loan period: 10
Hard due date : Exactly on 2022-06-30
(I didn't fill out anything else)

I also have the All/All rule that comes with a sandbox
Patron category: All
Item type: All
Current checkouts allowed: 5
Current on-site checkouts allowed: 5
Loan period: 5
Hard due date: None defined
(etc.)

I checked out 303857 (item-level itype = Music) to 23529000139858, and
the due date was 2022-06-30 (today)
I checked out 310114 (item-level itype = Books) to the same patron and
the due date was 2022-07-10 (ten days from now)

I'm not sure what I did differently than the test plan.

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-06-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #135998|0   |1
is obsolete||

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-06-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Martin Renvoize  changed:

   What|Removed |Added

 CC||martin.renvoize@ptfs-europe
   ||.com
 Attachment #135194|1   |0
is obsolete||

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-06-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #135194|0   |1
is obsolete||

--- Comment #15 from Martin Renvoize  ---
Created attachment 135998
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135998=edit
Bug 29012: Add default values for blank circulation rules that weren't saved to
the database

There are 5 fields that are not set if no value is provided when saving/editing
a rule in Administration->Circulation and fines rules
- issuelength
- hardduedate
- unseenrenewalsallowed
- rentaldiscount
- decreaseloanholds

This is problematic because it gives the impression these rules are set as
blank, but in reality they don't exist and the rule will fal back to the higher
level

To test:
1 - Set a rule for
Patron category: Teacher
Itemtype: All
Hard due date: (Today)
Lona period: 10
2 - Set a rule for
Patron category: Teacher
Itemtype: Books
Hard due date: (leave blank)
Loan period: 10
3 - Expected behaviour is Book item will checkout to teacher for 10 days, all
other types will be due yesterday at 25:59:00
4 - Checkout an non-book item type to teacher
5 - Hard due date applies
6 - Checkout a 'book' item type to teacher
7 - Hard due date applies - FAIL

Signed-off-by: Martin Renvoize 

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-05-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Kevin Carnes  changed:

   What|Removed |Added

 Attachment #131054|0   |1
is obsolete||

--- Comment #14 from Kevin Carnes  ---
Created attachment 135194
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135194=edit
Bug 29012: Add default values for blank circulation rules that weren't saved to
the database

There are 5 fields that are not set if no value is provided when saving/editing
a rule in Administration->Circulation and fines rules
- issuelength
- hardduedate
- unseenrenewalsallowed
- rentaldiscount
- decreaseloanholds

This is problematic because it gives the impression these rules are set as
blank, but in reality they don't exist and the rule will fal back to the higher
level

To test:
1 - Set a rule for
Patron category: Teacher
Itemtype: All
Hard due date: (Today)
Lona period: 10
2 - Set a rule for
Patron category: Teacher
Itemtype: Books
Hard due date: (leave blank)
Loan period: 10
3 - Expected behaviour is Book item will checkout to teacher for 10 days, all
other types will be due yesterday at 25:59:00
4 - Checkout an non-book item type to teacher
5 - Hard due date applies
6 - Checkout a 'book' item type to teacher
7 - Hard due date applies - FAIL

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-05-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Kevin Carnes  changed:

   What|Removed |Added

 Status|Patch doesn't apply |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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-05-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Lucas Gass  changed:

   What|Removed |Added

 CC||lu...@bywatersolutions.com
 Status|Needs Signoff   |Patch doesn't apply

--- Comment #13 from Lucas Gass  ---
This patchset doesn't apply cleanly to current master

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-02-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #12 from Kevin Carnes  ---
(In reply to Kevin Carnes from comment #9)
> (In reply to Nick Clemens from comment #7)
> > (In reply to Jonathan Druart from comment #4)
> > > I am not sure the patch is the correct way to fix it.
> > > If no value has not been filled in, we shouldn't default.
> > > 
> > > In my opinion we should better improve the way we calculate/retrieve the
> > > rules instead.
> > 
> > I think this fix is correct for current use of rules as a 'row' - we have
> > all the current rules inthe table grouped, and don't expect to fall back on
> > any individual column if a row is set for a patron/category type
> > 
> > I do think there are other issues:
> > bug 28774  made rentaldiscount not save if blank, but creates the same issue
> > here of defaulting to a higher rule level
> > unseen_renewals of '0' seems to translate to 'unlimited' - I don't think
> > that's correct
> 
> It appears that unseen_renewals is saved even when blank, so I removed it
> from the patch. Would somebody please confirm this?

Ok, unseen_renewals is only saved when UnseenRenewals is enabled. It now
defaults to "" which is unlimited. '0' means none are allowed. It only starts
counting unseen renewals when UnseenRenewals is not unlimited. It might make
more sense to always count unseen renewals.

The default value for rentaldiscount is 0, so it won't be blank and won't be
affected by bug 28774.

I also updated onboarding.pl for the Web installer. I don't know if there are
any more rules that should be fixed there.

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-02-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Kevin Carnes  changed:

   What|Removed |Added

 Attachment #131053|0   |1
is obsolete||

--- Comment #11 from Kevin Carnes  ---
Created attachment 131054
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131054=edit
Bug 29012: Add default values for blank circulation rules that weren't saved to
the database

There are 5 fields that are not set if no value is provided when saving/editing
a rule in Administration->Circulation and fines rules
- issuelength
- hardduedate
- unseenrenewalsallowed
- rentaldiscount
- decreaseloanholds

This is problematic because it gives the impression these rules are set as
blank, but in reality they don't exist and the rule will fal back to the higher
level

To test:
1 - Set a rule for
Patron category: Teacher
Itemtype: All
Hard due date: (Today)
Lona period: 10
2 - Set a rule for
Patron category: Teacher
Itemtype: Books
Hard due date: (leave blank)
Loan period: 10
3 - Expected behaviour is Book item will checkout to teacher for 10 days, all
other types will be due yesterday at 25:59:00
4 - Checkout an non-book item type to teacher
5 - Hard due date applies
6 - Checkout a 'book' item type to teacher
7 - Hard due date applies - FAIL

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-02-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Kevin Carnes  changed:

   What|Removed |Added

 Attachment #131043|0   |1
is obsolete||

--- Comment #10 from Kevin Carnes  ---
Created attachment 131053
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131053=edit
Bug 29012: Add default values for blank circulation rules that weren't saved to
the database

There are 5 fields that are not set if no value is provided when saving/editing
a rule in Administration->Circulation and fines rules
- issuelength
- hardduedate
- unseenrenewalsallowed
- rentaldiscount
- decreaseloanholds

This is problematic because it gives the impression these rules are set as
blank, but in reality they don't exist and the rule will fal back to the higher
level

To test:
1 - Set a rule for
Patron category: Teacher
Itemtype: All
Hard due date: (Today)
Lona period: 10
2 - Set a rule for
Patron category: Teacher
Itemtype: Books
Hard due date: (leave blank)
Loan period: 10
3 - Expected behaviour is Book item will checkout to teacher for 10 days, all
other types will be due yesterday at 25:59:00
4 - Checkout an non-book item type to teacher
5 - Hard due date applies
6 - Checkout a 'book' item type to teacher
7 - Hard due date applies - FAIL

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-02-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #9 from Kevin Carnes  ---
(In reply to Nick Clemens from comment #7)
> (In reply to Jonathan Druart from comment #4)
> > I am not sure the patch is the correct way to fix it.
> > If no value has not been filled in, we shouldn't default.
> > 
> > In my opinion we should better improve the way we calculate/retrieve the
> > rules instead.
> 
> I think this fix is correct for current use of rules as a 'row' - we have
> all the current rules inthe table grouped, and don't expect to fall back on
> any individual column if a row is set for a patron/category type
> 
> I do think there are other issues:
> bug 28774  made rentaldiscount not save if blank, but creates the same issue
> here of defaulting to a higher rule level
> unseen_renewals of '0' seems to translate to 'unlimited' - I don't think
> that's correct

It appears that unseen_renewals is saved even when blank, so I removed it from
the patch. Would somebody please confirm this?

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-02-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Kevin Carnes  changed:

   What|Removed |Added

 Attachment #128206|0   |1
is obsolete||

--- Comment #8 from Kevin Carnes  ---
Created attachment 131043
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131043=edit
Bug 29012: Add default values for blank circulation rules that weren't saved to
the database

There are 5 fields that are not set if no value is provided when saving/editing
a rule in Administration->Circulation and fines rules
- issuelength
- hardduedate
- unseenrenewalsallowed
- rentaldiscount
- decreaseloanholds

This is problematic because it gives the impression these rules are set as
blank, but in reality they don't exist and the rule will fal back to the higher
level

To test:
1 - Set a rule for
Patron category: Teacher
Itemtype: All
Hard due date: (Today)
Lona period: 10
2 - Set a rule for
Patron category: Teacher
Itemtype: Books
Hard due date: (leave blank)
Loan period: 10
3 - Expected behaviour is Book item will checkout to teacher for 10 days, all
other types will be due yesterday at 25:59:00
4 - Checkout an non-book item type to teacher
5 - Hard due date applies
6 - Checkout a 'book' item type to teacher
7 - Hard due date applies - FAIL

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-02-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #7 from Nick Clemens  ---
(In reply to Jonathan Druart from comment #4)
> I am not sure the patch is the correct way to fix it.
> If no value has not been filled in, we shouldn't default.
> 
> In my opinion we should better improve the way we calculate/retrieve the
> rules instead.

I think this fix is correct for current use of rules as a 'row' - we have all
the current rules inthe table grouped, and don't expect to fall back on any
individual column if a row is set for a patron/category type

I do think there are other issues:
bug 28774  made rentaldiscount not save if blank, but creates the same issue
here of defaulting to a higher rule level
unseen_renewals of '0' seems to translate to 'unlimited' - I don't think that's
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-02-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #6 from Kevin Carnes  ---
The problem was that certain blank values weren't saved and it seemed
reasonable to use default values when those values are blank.

Do users expect these rules to fall back to higher rules? In the test case,
hard due date for books is left blank and should not fall back to the rule for
all items. So in this case, using the default value is expected.

It is possible to allow falling back, but I'm not sure if it's the solution to
this bug

Which values do people think should be used? How should rules be calculated?

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-01-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Owen Leonard  changed:

   What|Removed |Added

   Assignee|koha-b...@lists.koha-commun |kevin.car...@ub.lu.se
   |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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-01-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #5 from Kevin Carnes  ---
It's possible to search the circulation rules for the branch code, category
code, and item type with either the specified values or null. The results can
be sorted to get the most relevant value for each of the 3 parameters. These 3
values can be used to search for the rule. If there is no rule, the default
value of the rule can be used.

This should give the same result as the patch, but it makes looking up a rule a
little more complicated.

If it's better to keep the ability to inherit or fall back to a less specific
set of rules, it would be necessary to specify if a value should be default or
inherited when defining the rules (e.g. using a special value or checking a
box). Rules that should be inherited wouldn't be saved and the current method
of finding rules should fall back to the most relevant value of the rule.

There is a problem since some rules depend on other rules (e.g. lengthunit). It
would be necessary to either make sure that these rules are retrieved from the
same set of rules or make these values self-contained (e.g. length and unit in
the same value).

As it is now, it's possible to retrieve the lengthunit from a set of rules
without an issuelength and the issuelength from a less specific set of rules
with a different lengthunit.

-- 
You are receiving this mail because:
You are the assignee for the bug.
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2022-01-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Jonathan Druart  changed:

   What|Removed |Added

 CC||jonathan.druart+koha@gmail.
   ||com

--- Comment #4 from Jonathan Druart  ---
I am not sure the patch is the correct way to fix it.
If no value has not been filled in, we shouldn't default.

In my opinion we should better improve the way we calculate/retrieve the rules
instead.

-- 
You are receiving this mail because:
You are the assignee for the bug.
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2021-12-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Kevin Carnes  changed:

   What|Removed |Added

 Status|NEW |Needs Signoff

--- Comment #3 from Kevin Carnes  ---
Here is a possible solution. It just sets a default value if no value is
specified when saving a rule. There is also an atomic update to update rules
already in the database. We are testing it and would appreciate your feedback
so I'm setting it as "Needs Signoff". Please advise me if this not correct.

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2021-12-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Kevin Carnes  changed:

   What|Removed |Added

 CC||kevin.car...@ub.lu.se
 Attachment #128205|1   |0
   is patch||
 Attachment #128205|0   |1
is obsolete||

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2021-12-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #2 from Kevin Carnes  ---
Created attachment 128206
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128206=edit
Bug 29012: Add default values for blank circulation rules that weren't saved to
the database

There are 5 fields that are not set if no value is provided when saving/editing
a rule in Administration->Circulation and fines rules
- issuelength
- hardduedate
- unseenrenewalsallowed
- rentaldiscount
- decreaseloanholds

This is problematic because it gives the impression these rules are set as
blank, but in reality they don't exist and the rule will fal back to the higher
level

To test:
1 - Set a rule for
Patron category: Teacher
Itemtype: All
Hard due date: (Today)
Lona period: 10
2 - Set a rule for
Patron category: Teacher
Itemtype: Books
Hard due date: (leave blank)
Loan period: 10
3 - Expected behaviour is Book item will checkout to teacher for 10 days, all
other types will be due yesterday at 25:59:00
4 - Checkout an non-book item type to teacher
5 - Hard due date applies
6 - Checkout a 'book' item type to teacher
7 - Hard due date applies - FAIL

-- 
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2021-12-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

--- Comment #1 from Kevin Carnes  ---
Created attachment 128205
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128205=edit
[PATCH] Bug 29012: Add default values for blank circulation rules that weren't
saved to the database

There are 5 fields that are not set if no value is provided when saving/editing
a rule in Administration->Circulation and fines rules
- issuelength
- hardduedate
- unseenrenewalsallowed
- rentaldiscount
- decreaseloanholds

This is problematic because it gives the impression these rules are set as
blank, but in reality they don't exist and the rule will fal back to the higher
level

To test:
1 - Set a rule for
Patron category: Teacher
Itemtype: All
Hard due date: (Today)
Lona period: 10
2 - Set a rule for
Patron category: Teacher
Itemtype: Books
Hard due date: (leave blank)
Loan period: 10
3 - Expected behaviour is Book item will checkout to teacher for 10 days, all
other types will be due yesterday at 25:59:00
4 - Checkout an non-book item type to teacher
5 - Hard due date applies
6 - Checkout a 'book' item type to teacher
7 - Hard due date applies - FAIL

-- 
You are receiving this mail because:
You are the assignee for the bug.
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 29012] Some rules are not saved when left blank while editing a 'rule' line in smart-rules.pl

2021-09-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29012

Andrew Fuerste-Henry  changed:

   What|Removed |Added

 CC||and...@bywatersolutions.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/