Tuesday, December 12, 2023

Koha Upgrade Error: Fixing Invalid Monetary Values in Circulation Rules

Upgrading Koha is typically a smooth process, but occasionally, users may encounter errors that require manual intervention. One such issue involves an error related to the "overduefinecap" rule in the circulation rules during the upgrade process. This blog post helps you identify and resolve this specific problem.

Error Description:

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: overduefinecap Value: 1,000.00

The error message indicates that the "overduefinecap" rule contains an invalid monetary value. Specifically, the system expects the value to be '0.00', and if it's different, it can lead to an unsuccessful upgrade.

Identifying the Issue:

To identify the issue, users are advised to connect to their Koha database and query the circulation rules table. The following SQL command can be used:

USE koha_library;

SELECT * FROM circulation_rules WHERE rule_name = 'overduefinescap';

This command retrieves the existing records for the "overduefinescap" rule, allowing users to verify if the rule's value is different from '0.00'.

Fixing the Issue:

If the value for the "overduefinescap" rule is not '0.00', the following SQL command can be used to update it:

UPDATE circulation_rules SET rule_value = '0.00' WHERE rule_name = 'overduefinescap';

This command sets the rule_value to '0.00', aligning it with the expected value.

After executing these SQL commands, you can retry the upgrade process for Koha. Ensure that you have a backup of your Koha database before making any changes, as modifying the database directly can have significant consequences if not done correctly. If you're not comfortable with this process, it's advisable to seek assistance from someone with experience in managing Koha installations.


No comments:

Post a Comment