Bug 35472

Summary: Bug 33028 - Fix wrongly formatted values for monetary values in circulation rules
Product: Koha Reporter: NASEEL <naseel>
Component: Installation and upgrade (command-line installer)Assignee: Bugs List <koha-bugs>
Status: CLOSED WONTFIX QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: magnus, martin.renvoize, tomascohen
Version: 23.05   
Hardware: PC   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description NASEEL 2023-12-04 07:31:54 UTC
koha-common                                23.11.00-1 

upgrading database schema for library
Upgrade to 23.06.00.010  [01:00:16]: Bug 33028 - Fix wrongly formatted values for monetary values in circulation rules
ERROR - {UNKNOWN}: Circulation rules contain invalid monetary values:
Rule ID: 419 (All-TE-BK) 	Rule: overduefinescap	Value: 1,000.00
Rule ID: 2150 (All-GL-BK) 	Rule: overduefinescap	Value: 1,000.00
Rule ID: 2464 (EMEACL-GL-BK) 	Rule: overduefinescap	Value: 1,000.00

Please fix these before you restart the update. at /usr/share/koha/intranet/cgi-bin/installer/data/mysql/db_revs/230600010.pl line 33. at /usr/share/koha/lib/C4/Installer.pm line 741
Comment 1 Katrin Fischer 2023-12-04 09:36:10 UTC
Hi Naseel, this is not a bug, it's supposed to help you fix your configuration.

When you go into your circulation rules, you need to fix the overdue amount through editing for the listed combinations.

The , in the format is not valid. Remove it and things should be ok to continue.
Comment 2 Magnus Enger 2023-12-04 13:49:50 UTC
I have fun into this several times when upgrading. I have solved it by logging into the database and running queries like these: 

UPDATE circulation_rules SET rule_value = '0.00' WHERE rule_value = '0,00';

You will have to replace the numbers with the actual numbers that are problematic in your databse. Then resume the upgrade with: 

sudo apt-get (dist-)upgrade