Skip to content

FINERACT-2455: Add loan origination support to working capital loans#5971

Merged
adamsaghy merged 2 commits into
apache:developfrom
openMF:FINERACT-2455-loan-origination-for-working-capital-loans
Jun 23, 2026
Merged

FINERACT-2455: Add loan origination support to working capital loans#5971
adamsaghy merged 2 commits into
apache:developfrom
openMF:FINERACT-2455-loan-origination-for-working-capital-loans

Conversation

@Cocoa-Puffs

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.

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

@Cocoa-Puffs Cocoa-Puffs force-pushed the FINERACT-2455-loan-origination-for-working-capital-loans branch from c02872e to d897083 Compare June 10, 2026 13:09
@adamsaghy

Copy link
Copy Markdown
Contributor

@Cocoa-Puffs Please review the failing checks

@Cocoa-Puffs Cocoa-Puffs force-pushed the FINERACT-2455-loan-origination-for-working-capital-loans branch 3 times, most recently from b1fab89 to 80f3b2f Compare June 16, 2026 12:04
@Cocoa-Puffs Cocoa-Puffs force-pushed the FINERACT-2455-loan-origination-for-working-capital-loans branch from 02cffff to 0ec8a04 Compare June 19, 2026 07:44
@ruzeynalov ruzeynalov force-pushed the FINERACT-2455-loan-origination-for-working-capital-loans branch from 0ec8a04 to 4cab072 Compare June 19, 2026 16:21
@Cocoa-Puffs Cocoa-Puffs force-pushed the FINERACT-2455-loan-origination-for-working-capital-loans branch 3 times, most recently from 88154b6 to 063f7d9 Compare June 22, 2026 11:55
@adamsaghy

Copy link
Copy Markdown
Contributor

Things to be considered

Doc/permission mismatch (should fix).

The WC attach/detach @operation descriptions say "Requires ATTACH_LOAN_ORIGINATOR / DETACH_LOAN_ORIGINATOR permission", but the command entity is WORKING_CAPITAL_LOAN_ORIGINATOR and the migration seeds ATTACH_WORKING_CAPITAL_LOAN_ORIGINATOR / DETACH_WORKING_CAPITAL_LOAN_ORIGINATOR. The Swagger text is a stale copy-paste and will mislead API consumers about which permission to grant.

Module placement inconsistency (worth a look).

WorkingCapitalLoanOriginatorMapping, its repository, and WorkingCapitalLoanOriginatorMappingNotFoundException live in the loanorigination module, while every other WC originator class (services, handlers, API resource, the not-in-submitted-status exception) lives in the workingcapitalloan module. These WC-specific classes only reference loan_id as a plain Long, so nothing forces them into the origination module — placing them with the rest of the WC code would be more consistent with how the feature is otherwise split.

@Cocoa-Puffs Cocoa-Puffs force-pushed the FINERACT-2455-loan-origination-for-working-capital-loans branch 2 times, most recently from b55352e to d624540 Compare June 22, 2026 16:09
@Cocoa-Puffs

Copy link
Copy Markdown
Contributor Author

Things to be considered

Doc/permission mismatch (should fix).

The WC attach/detach @operation descriptions say "Requires ATTACH_LOAN_ORIGINATOR / DETACH_LOAN_ORIGINATOR permission", but the command entity is WORKING_CAPITAL_LOAN_ORIGINATOR and the migration seeds ATTACH_WORKING_CAPITAL_LOAN_ORIGINATOR / DETACH_WORKING_CAPITAL_LOAN_ORIGINATOR. The Swagger text is a stale copy-paste and will mislead API consumers about which permission to grant.

Module placement inconsistency (worth a look).

WorkingCapitalLoanOriginatorMapping, its repository, and WorkingCapitalLoanOriginatorMappingNotFoundException live in the loanorigination module, while every other WC originator class (services, handlers, API resource, the not-in-submitted-status exception) lives in the workingcapitalloan module. These WC-specific classes only reference loan_id as a plain Long, so nothing forces them into the origination module — placing them with the rest of the WC code would be more consistent with how the feature is otherwise split.

I have moved everything I could into the originators module. some things stayed because they depend on wc module content.

WorkingCapitalLoanOriginatorsApiResource.java — depends on WorkingCapitalLoanConstants, WorkingCapitalLoanNotFoundException, and WorkingCapitalLoanApplicationReadPlatformService (all WC module). Cannot move.

WorkingCapitalLoanOriginatorWritePlatformService.java — depends on WorkingCapitalLoan, WorkingCapitalLoanRepository, and WorkingCapitalLoanNotFoundException (all WC module). Cannot move.

AttachWorkingCapitalLoanOriginatorCommandHandler.java — depends on WorkingCapitalLoanOriginatorWritePlatformService (WC module). Cannot move.

DetachWorkingCapitalLoanOriginatorCommandHandler.java — same as above. Cannot move.

Other than these newly created files the other are in the originators module.

@adamsaghy

Copy link
Copy Markdown
Contributor

@Cocoa-Puffs Please rebase.

@Cocoa-Puffs Cocoa-Puffs force-pushed the FINERACT-2455-loan-origination-for-working-capital-loans branch 4 times, most recently from 3ff2b3a to 4a39e92 Compare June 23, 2026 09:39

@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

@Cocoa-Puffs Cocoa-Puffs force-pushed the FINERACT-2455-loan-origination-for-working-capital-loans branch from 4a39e92 to b91a327 Compare June 23, 2026 11:00
@adamsaghy adamsaghy merged commit 69ace79 into apache:develop Jun 23, 2026
90 checks passed
@adamsaghy adamsaghy deleted the FINERACT-2455-loan-origination-for-working-capital-loans branch June 23, 2026 11:50
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