Skip to content

Conversation

@Monica-CodingWorld
Copy link
Contributor

@Monica-CodingWorld Monica-CodingWorld commented Jan 1, 2026

Description

This PR fixes a typo in the code and REST API:

  • Replaced all occurrences of the misspelled 'allowPartialPeriodInterestCalcualtion' with the correct 'allowPartialPeriodInterestCalculation'

  • Changes applied across 35 files including LoanProductConstants.java, API resources, and test classes

  • Ensures consistency between code, constants, and REST API fields

Changes: 35 files updated with typo fixes
Scope: Only the typo fix as specified in the JIRA ticket
Build Status: ✅ Compilation passes successfully

JIRA Issue: https://issues.apache.org/jira/browse/FINERACT-2206

Checklist

  • Typos corrected in code and constants
  • Tests updated accordingly
  • Verified REST API fields are corrected
  • Commit messages follow FINERACT guidelines

Note

The failing test are unrelated to this PR as this PR only fixes a typo in 35 files with no logic changes

protected static final GenericContainer POSTGRES_CONTAINER = new GenericContainer("postgres:16").withNetwork(network)
.withNetworkAliases("postgres").withExposedPorts(5432)
.withEnv(Map.of("POSTGRES_DB", "fineract-test", "POSTGRES_USER", "root", "POSTGRES_PASSWORD", "mifos"));
protected static final GenericContainer<?> POSTGRES_CONTAINER =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why needed to change on CommandBaseTest.java is it related to typo?

Copy link
Contributor

@IOhacker IOhacker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove unrelated changes, squash and commit

@IOhacker
Copy link
Contributor

IOhacker commented Jan 1, 2026 via email

@Monica-CodingWorld
Copy link
Contributor Author

Hi Monica, If you think this is another issue the open a new ticket and describe on that ticket which are the conditions that raise the error. I have to remark that it is not a Apache Fineract issue because the system is working with the typo. You should investigate the root cause of the inestability faced in your development environment. El El jue, 1 de ene de 2026 a la(s) 7:22 a.m., Monica < @.> escribió:

@.
* commented on this pull request. ------------------------------ In fineract-command/src/test/java/org/apache/fineract/command/CommandBaseTest.java <#5279 (comment)>: > @@ -40,9 +40,17 @@ abstract class CommandBaseTest { protected static Network network = Network.newNetwork(); @container - protected static final GenericContainer POSTGRES_CONTAINER = new GenericContainer("postgres:16").withNetwork(network) - .withNetworkAliases("postgres").withExposedPorts(5432) - .withEnv(Map.of("POSTGRES_DB", "fineract-test", "POSTGRES_USER", "root", "POSTGRES_PASSWORD", "mifos")); + protected static final GenericContainer<?> POSTGRES_CONTAINER = The change in CommandBaseTest.java was committed because the test suite was failing without explicitly setting the timezone. While working on the typo fix, the tests exposed an existing instability caused by timezone differences between environments.To ensure the build passes reliably and tests remain deterministic across systems, the timezone configuration was added to the test setup. This is a test infrastructure fix, not a functional or API change, found it necessary to complete and validate the typo-related changes. — Reply to this email directly, view it on GitHub <#5279 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALD2ZAQFY2UPS3Y3CO2IJAT4EUNQXAVCNFSM6AAAAACQOHKF3CVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTMMRRHA2TSNRSGA . You are receiving this because you commented.Message ID: @.***>

Hi IOhacker,
Thank you for your remarks and guidance. I am reviewing the feedback carefully and re-analyzing the changes. I will update the PR shortly with the required corrections and will ensure such issues are avoided going forward.
Thanks again for your time and support.

@Monica-CodingWorld Monica-CodingWorld force-pushed the fix-FINERACT-2206 branch 2 times, most recently from 785e03e to f94427b Compare January 1, 2026 18:31
@IOhacker
Copy link
Contributor

IOhacker commented Jan 1, 2026

@Monica-CodingWorld stay stick to the change, as I have writen by email the change is in 35 files and there are 142 ocurrences. This is the fix that is describe in the Jira ticket and that has been discussed by email. There are no more changes required to be done in that ticket. By the way you can remove the TZ/Hibernate in the PR description. Thank you for your effort! Go ahead!

@IOhacker
Copy link
Contributor

IOhacker commented Jan 1, 2026

@Monica-CodingWorld "One line of code at a time" you should focus your initial contributtion efforts on writing small, functional pieces of code and then gradually you will see progress in all your skills

Fixed misspelled 'allowPartialPeriodInterestCalcualtion' to
'allowPartialPeriodInterestCalculation' in REST API and code.
35 files updated as specified in JIRA.
@Monica-CodingWorld
Copy link
Contributor Author

@Monica-CodingWorld "One line of code at a time" you should focus your initial contributtion efforts on writing small, functional pieces of code and then gradually you will see progress in all your skills

@IOhacker PR description updated as requested:

  1. Removed all references to timezone/hibernate changes
  2. Focused description on only the typo fix
  3. Confirmed 35 files updated as specified
  4. Build passes successfully

Ready for final review.

@Monica-CodingWorld
Copy link
Contributor Author

@Monica-CodingWorld stay stick to the change, as I have writen by email the change is in 35 files and there are 142 ocurrences. This is the fix that is describe in the Jira ticket and that has been discussed by email. There are no more changes required to be done in that ticket. By the way you can remove the TZ/Hibernate in the PR description. Thank you for your effort! Go ahead!

@IOhacker Thank you Victor actually learn a lot about open source from this. The PR is now focused solely on the 35-file, 142-occurrence typo fix described in the JIRA ticket.
Ready for review.

@IOhacker
Copy link
Contributor

IOhacker commented Jan 2, 2026

LGTM, wait for the results of the GA checks.

@IOhacker
Copy link
Contributor

IOhacker commented Jan 2, 2026

@Monica-CodingWorld there are errors in the Github Actions (GA) please make sure that your testing in the GA are passing. You can debug it.

@adamsaghy
Copy link
Contributor

  org.apache.fineract.integrationtests.SavingsInterestPostingTest
  
    Test testOverdraftAndInterestPosting_WithOverdraftProduct_WhitBalanceGreaterZero() PASSED (4.6s)
    Test testPostInterestWithOverdraftProduct() PASSED (4.3s)
    Test testOverdraftAndInterestPosting_WithOverdraftProduct_WhitBalanceLessZero() PASSED (4.3s)
    Test testPostInterestForDuplicatePrevention() PASSED (3m 28s)
    Test testOverdraftInterestWithOverdraftProduct() PASSED (4.4s)
    Test testPostInterestNotZero() FAILED (1.9s)
  
    java.lang.AssertionError: 1 expectation failed.
    Expected status code <200> but was <400>.
        at org.apache.fineract.integrationtests.SavingsInterestPostingTest.lambda$testPostInterestNotZero$4(SavingsInterestPostingTest.java:346)
  
  

@adamsaghy
Copy link
Contributor

@Monica-CodingWorld Please apply this patch:

Index: integration-tests/src/test/java/org/apache/fineract/integrationtests/SavingsInterestPostingTest.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/SavingsInterestPostingTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/SavingsInterestPostingTest.java
--- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/SavingsInterestPostingTest.java	(revision f5d766b2f42b150263122dd7e5fea8bfc40c0aaa)
+++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/SavingsInterestPostingTest.java	(date 1767402714226)
@@ -340,7 +340,7 @@
                     interestReceivableAccount.getAccountID().toString(), assetAccount, incomeAccount, expenseAccount, liabilityAccount);
 
             final Integer clientId = ClientHelper.createClient(requestSpec, responseSpec, "01 January 2025");
-            final LocalDate startDate = LocalDate.of(LocalDate.now(Utils.getZoneIdOfTenant()).getYear(), 1, 1);
+            final LocalDate startDate = LocalDate.of(2025,1,1);
             final String startStr = DateTimeFormatter.ofPattern("dd MMMM yyyy", Locale.US).format(startDate);
 
             final Integer accountId = savingsAccountHelper.applyForSavingsApplicationOnDate(clientId, productId,

Fixed startDate from dynamic current year to hardcoded 2025 in
testPostInterestNotZero() to maintain consistent 2025 timeline.
Resolves HTTP 400 error caused by date mismatches.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants