Skip to content

FINERACT-1992: Multi delinquency implication on events - #3595

Merged
adamsaghy merged 1 commit into
apache:developfrom
ruchiD:FINERACT-1992-Multi-delinquency-implication-on-events
Nov 23, 2023
Merged

FINERACT-1992: Multi delinquency implication on events#3595
adamsaghy merged 1 commit into
apache:developfrom
ruchiD:FINERACT-1992-Multi-delinquency-implication-on-events

Conversation

@ruchiD

@ruchiD ruchiD commented Nov 21, 2023

Copy link
Copy Markdown
Contributor

Description

Event payload changes to include installment level delinquency data for LoanDelinquencyRangeChangeEvent.

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 https://github.com/apache/fineract/#pull-requests

  • 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 coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/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

  • Submission is not a "code dump". (Large changes can be made "in repository" via a branch. Ask on the developer mailing list for guidance, if required.)

FYI our guidelines for code reviews are at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide.

@adamsaghy

Copy link
Copy Markdown
Contributor

@reluxa FYI

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.

I think it might make sense to cover the logic which assembles installmentsDelinquencyData with a few unit tests.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

@reluxa

reluxa commented Nov 22, 2023

Copy link
Copy Markdown
Contributor

Have you covered the below scenarios as well?

  • When loan goes into pause delinquency started (consider the design for other programs like re-age, payment holiday starts)
  • When loan comes out of pause delinquency ended (consider the design for other programs like re-age, payment holiday ends)

According to the delinquency event shall be emitted in this case too.

Update:
We have discussed this with @ruchiD, and came to the conclusion that there is a dependency on @taskain7's story which calculates whether the COB should be kicked off or not. That is the point where these events shall be triggered in order to cover the above two scenarios. I will update @taskain7 's ticket just to make sure it won't be forgotten.

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.

According to the design the fields here should have been moved up, like installmentDelinquencyBuckets[n].minimumAgeDays and yours is installmentDelinquencyBuckets[n].delinquencyRange.minimumAgeDays I think it's perfectly fine, but please update the documentation to make it inline with the implementation.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

@ruchiD
ruchiD force-pushed the FINERACT-1992-Multi-delinquency-implication-on-events branch from e5b1048 to 3477eb3 Compare November 22, 2023 14:51
.setCurrency(currencyMapper.map(data.getCurrency()))//
.setDelinquentDate(delinquentDate)//
.build();
.setInstallmentDelinquencyBuckets(installmentsDelinquencyData).build();

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.

This should be calculated and set only when the installment level delinquency is enabled on the loan.

private boolean enableInstallmentLevelDelinquency = false;

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.

Ah, please ignore, I can see that you are checking it in line 124

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@reluxa , This check is there in calculateInstallmentLevelDelinquencyData method.

private List calculateInstallmentLevelDelinquencyData(Loan loan, LoanAccountData data) {
List loanInstallmentDelinquencyData = new ArrayList<>();
if (loan.isEnableInstallmentLevelDelinquency()) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

okay

@reluxa

reluxa commented Nov 23, 2023

Copy link
Copy Markdown
Contributor

LGTM

@adamsaghy
adamsaghy merged commit 48300cd into apache:develop Nov 23, 2023

@jdailey jdailey 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 seems good, would like to see more tests

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