[
https://issues.apache.org/jira/browse/FINERACT-2921?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Arnold Galovics closed FINERACT-2921.
-------------------------------------
Resolution: Fixed
> Recalculate Interest For Loans never selects loans for floating rate changes:
> m_floating_rates_periods.created_date is no longer written
> ----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: FINERACT-2921
> URL: https://issues.apache.org/jira/browse/FINERACT-2921
> Project: Apache Fineract
> Issue Type: Bug
> Reporter: Arnold Galovics
> Assignee: Arnold Galovics
> Priority: Major
> Fix For: 1.17.0
>
>
> 🐛 Steps to Reproduce
> 1. Active loan product with a floating rate; an active loan on it
> (is_floating_interest_rate = true).
> 2. Add a floating rate period via the API (POST /floatingrates/\{id}) dated
> so the loan needs recalculating.
> 3. Check m_floating_rates_periods for the new row: created_date is NULL,
> created_on_utc is set.
> 4. Run "Recalculate Interest for Loans" the next day.
>
> ❌ Actual Result
> • The loan is not selected for recalculation because of the rate change.
>
> ✅ Expected Result
> • Loans affected by a new floating rate period (or a changed base rate) are
> recalculated.
>
> ℹ️ Notes
> • Found by reading the code and migrations, not executed. Same on 1.15.0
> (queries at :1850/:1864/:1906/:1918).
>
> 🔧 Technical Notes
> • LoanReadPlatformServiceImpl filters frp.created_date >= ? and
> bfrp.created_date >= ? (develop :1850, :1864, :1906, :1918).
> FloatingRatePeriod extends AbstractAuditableWithUTCDateTimeCustom and writes
> created_on_utc (migration 0024 floating-rate-period-1). NULL >= ? is never
> true, so bfrp.id IS NOT NULL never holds either.
> • Fix: filter on created_on_utc.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)