Skip to content

FINERACT-1597: Fix validation error for well-formed term deposit chart slabs#5565

Open
airajena wants to merge 1 commit intoapache:developfrom
airajena:FINERACT-1597/term-deposit-chart-slab-validation
Open

FINERACT-1597: Fix validation error for well-formed term deposit chart slabs#5565
airajena wants to merge 1 commit intoapache:developfrom
airajena:FINERACT-1597/term-deposit-chart-slab-validation

Conversation

@airajena
Copy link
Contributor

@airajena airajena commented Mar 1, 2026

Summary

This PR fixes a validation bug where updating/creating term deposit products with valid chart slabs could fail with:

validation.msg.recurringdeposit.chart.slabs.range.end.incorrect

The issue appeared for well-formed terminal slabs (for example: fromPeriod=0, toPeriod=3).

Root Cause

Chart slab validation in InterestRateChart.validateChartSlabs(...) treated certain end-range values as invalid even when there was no subsequent slab requiring continuity validation.

Changes

  • Removed incorrect end-range validation branches
  • Removed obsolete helper method no longer used by validation

Scope

  • No API contract changes
  • No schema/Liquibase changes
  • No behavior changes outside chart slab validation in term deposit interest chart domain

Validation

Executed locally:

  • ./gradlew :fineract-savings:test --tests org.apache.fineract.portfolio.interestratechart.domain.InterestRateChartValidationTest
  • ./gradlew spotlessApply spotbugsMain spotbugsTest checkstyleMain checkstyleTest

Risk

Low.
Changes are localized to chart validation logic + one focused regression test.

@airajena airajena force-pushed the FINERACT-1597/term-deposit-chart-slab-validation branch from 87d0f12 to 31de373 Compare March 2, 2026 05:55
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.

LGTM

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.

2 participants