Dear Fineract Community, I would like to bring your attention to my recent PR: https://github.com/apache/fineract/pull/4057. I would greatly appreciate your feedback and thoughts on the matter.
Historically, global configurations were introduced into the system via Flyway (up to version 1.6) and later through Liquibase scripts. In many cases, the ID field value was explicitly defined, effectively hardcoding it. Currently, the global configuration API provides the following capabilities: Fetching entries by ID Fetching entries by name (this functionality was previously introduced) Updating entries by ID only This PR adds the ability to update global configuration entries by name. Since the name field is unique for each global configuration, it serves as an ideal candidate for identifying entries. Additionally, this PR modifies the integration tests, changing the retrieval and updating of global configurations to rely solely on the entry name. This change improves readability and helps prevent issues caused by ID changes or inconsistencies due to custom configurations. Why should we prefer using the name instead of the ID? Hardcoded IDs in Liquibase scripts for global configurations can lead to conflicts and inconsistencies, especially when past entries have been deleted or when projects have introduced custom configurations. These issues may arise when new global configurations are added. I propose that, moving forward, we avoid providing hardcoded IDs for new global configurations. Instead, we should rely on the database’s sequence generator or identity solutions to assign IDs. This practice could also extend beyond global configurations, as hardcoded IDs are generally not recommended. I look forward to hearing your thoughts on this proposal. Best regards, Adam