Skip to content

FINERACT-2455: Move working capital related classes into fineract-working-capital-loan module - #6298

Open
adamsaghy wants to merge 1 commit into
apache:developfrom
adamsaghy:FINERACT-2455/move-working-capital
Open

FINERACT-2455: Move working capital related classes into fineract-working-capital-loan module#6298
adamsaghy wants to merge 1 commit into
apache:developfrom
adamsaghy:FINERACT-2455/move-working-capital

Conversation

@adamsaghy

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.

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

@Aman-Mittal Aman-Mittal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nothing to nitpick

@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.

Verified this actually builds and the module's tests stay green - component scan, MapStruct-generated mappers, and bean-name-based batch command wiring all still resolve correctly after the move. Nice work.

One thing worth fixing before merge:

WorkingCapitalLoanConstants.WORKING_CAPITAL_LOAN_TRANSACTION_IDENTIFIER = "WC" is now a second copy of a constant that already exists in AccountingProcessorHelper (which still writes the prefix onto journal entry transaction IDs), while the new copy is only used to read it back in WorkingCapitalLoanJournalEntryDataMapper. Two magic strings that have to stay in sync - if they ever drift, journal entry event serialization just silently stops matching, with no error. Since fineract-provider already depends on fineract-working-capital-loan, there's nothing stopping AccountingProcessorHelper from referencing this new constant instead of declaring its own. Given the PR is about consolidating WC code into one module, this is exactly the kind of duplication it should be closing, not adding to.

Smaller thing: dependencies.gradle pulls in org.apache.httpcomponents:httpclient, but the only org.apache.http import in the module (HttpStatus) lives in httpcore, which is what every other feature module in the repo declares for the same import. Worth swapping to match convention and avoid the extra transitive.

Also noticed about a dozen other WorkingCapital* classes (COB executors, the accounting processor, the COB API filter) are still sitting in fineract-provider - fine as incremental work, but worth a note in the description since it's directly why the constant above got duplicated instead of moved.

Recommendation: APPROVE

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