Skip to content

FINERACT-2455: Working Capital single active delinquency tag - #6502

Merged
adamsaghy merged 2 commits into
apache:developfrom
openMF:FINERACT-2455/wc-single-active-delinquency-tag
Sep 30, 2026
Merged

adamsaghy merged 2 commits into
apache:developfrom
openMF:FINERACT-2455/wc-single-active-delinquency-tag

Conversation

@budaidev

Copy link
Copy Markdown
Contributor

Description

Describe the changes made and why they were made. (Ignore if these details are present on the associated Apache Fineract JIRA ticket.)

Checklist

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Write the commit message as per our guidelines
  • Acknowledge that we will not review PRs that are not passing the build ("green") - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.
  • Create/update unit or integration tests for verifying the changes made.
  • Follow our coding conventions.
  • Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes
  • This PR must not be a "code dump". Large changes can be made in a branch, with assistance. Ask for help on the developer mailing list.
  • If merging this PR resolves a JIRA issue, I will mark that issue as resolved and set "Fix Version/s" appropriately.
  • I followed the AI Policy.

Your assigned reviewer(s) will follow our guidelines for code reviews.

@budaidev
budaidev force-pushed the FINERACT-2455/wc-single-active-delinquency-tag branch from 4a43bf8 to 56f3def Compare September 24, 2026 13:17
@ruzeynalov
ruzeynalov force-pushed the FINERACT-2455/wc-single-active-delinquency-tag branch from 8bcd086 to fef6c9e Compare September 29, 2026 10:28
@budaidev
budaidev force-pushed the FINERACT-2455/wc-single-active-delinquency-tag branch from fef6c9e to bd2ac7f Compare September 29, 2026 12:58
@adamsaghy
adamsaghy marked this pull request as ready for review September 29, 2026 14:23

@galovics galovics left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review

Tag transition logic looks fine to me, and existing loans with several active tags on one period clean themselves up on the next classification, so I don't see the need for a data migration. Couple of questions though.

fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/service/WorkingCapitalLoanDelinquencyReadPlatformServiceImpl.java (findDelinquencyStartDate / findPeriodDelinquencyStartDate):

I'm not convinced about walking the lifted tag chain to get the delinquency start date. The javadoc on applyDelinquencyTagForRange even says the read side relies on the lift date matching the add date exactly. That's a hidden contract across two services, and the next person who touches the write side (reset, disable/undo, reprocess, etc.) will break it without noticing. The range schedule period already knows when it became delinquent (toDate + delinquent days). Can't we get the start date from there, or store it on the period when the first tag is added? Thoughts?

fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/service/WorkingCapitalLoanDelinquencyRangeScheduleServiceImpl.java:140:

Bugfix? Switching from transactionDate to the business date changes behaviour for backdated repayments, so it'd be good to mention it in the PR description. Also the comment at the end of allocateRepayment still says "applyRepayment classifies after the balance cap with the real transaction date". Pls update it.

Recommendation: COMMENT

@adamsaghy
adamsaghy force-pushed the FINERACT-2455/wc-single-active-delinquency-tag branch from bd2ac7f to 02d1e1f Compare September 30, 2026 07:19
@adamsaghy
adamsaghy force-pushed the FINERACT-2455/wc-single-active-delinquency-tag branch from 02d1e1f to 925690e Compare September 30, 2026 08:36

@adamsaghy adamsaghy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@adamsaghy
adamsaghy merged commit 386ee15 into apache:develop Sep 30, 2026
94 checks passed
@adamsaghy
adamsaghy deleted the FINERACT-2455/wc-single-active-delinquency-tag branch September 30, 2026 09:34
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