Skip to content

Conversation

@rhopman
Copy link
Contributor

@rhopman rhopman commented Feb 9, 2026

Description

Adds availableBalance field to the group accounts endpoint (/groups/{groupId}/accounts), providing visibility into withdrawable funds by distinguishing between total balance and funds on hold.

Changes

New Fields Added to Savings Account Summary:

  • onHoldFunds - Automatic holds from loan guarantees
  • savingsAmountOnHold - User-initiated/lien holds
  • availableBalance - Calculated as: accountBalance - onHoldFunds - savingsAmountOnHold

Checklist

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

@rhopman rhopman changed the title FINERACT-2473 Add available balance to group accounts endpoint FINERACT-2473: Add available balance to group accounts endpoint Feb 9, 2026
Copy link
Contributor

@Aman-Mittal Aman-Mittal left a comment

Choose a reason for hiding this comment

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

Address review comments, and please sign your commit with GPG key

public Long getId() {
return id;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can use lombok for these boilerplate code

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @Aman-Mittal. Do you know if the coding standards regarding getters/setters/lombok are described somewhere? I couldn't find it.

Copy link
Contributor

Choose a reason for hiding this comment

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

hi @rhopman you can see
fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/Charge.java
it has implementation of both getter and setter

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the example, @Aman-Mittal! I'm trying to find out what the documented code standards are regarding the use of Lombok. I know that this is a much-debated topic in the Java community. I am fine either way, but I would like to adhere to the project's documented code standards.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for your concern, in my opinion lomboks are better in this case as we are using simple getters and setters. As this class is simple DTO not using any complicated logic.

Copy link
Contributor

Choose a reason for hiding this comment

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

We should use Lombok for getters setters where it makes sense

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@adamsaghy I'm more than happy to change it but could you point me to the documentation where this standard is documented? And if it's not yet documented, may I suggest we add it to CONTRIBUTING.md or to the coding conventions?

Copy link
Contributor

Choose a reason for hiding this comment

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

I dont recall whether it was documented or not.

it's a good idea to include in the contributions and coding conventions. Feel free to draft something and raise it in a new PR ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done! #5478

@IOhacker
Copy link
Contributor

@rhopman from Adam Monsen's email:

There's a new ci action for PRs to check that new commits are signed.

All committers already have PGP/GPG keys, so just make sure you're also signing commits. You can add this to your ~/.gitconfig (or equivalent) to do it automatically:

[commit]
gpgSign = true

Upload your public key to github to make the verified badges green.

More info: FINERACT-2177, PR #5431.

Hints: 1) try it locally before pushing. 2) have git run it for you: Create .git/hooks/pre-push with:

#!/bin/sh
scripts/verify-signed-commits.sh --strict

Be sure to make that script executable.

@rhopman rhopman force-pushed the feature/add-available-balance-to-group-accounts branch 3 times, most recently from cbb4c9b to 988260d Compare February 10, 2026 07:43
Copy link
Contributor

@IOhacker IOhacker left a comment

Choose a reason for hiding this comment

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

LGTM

@rhopman rhopman force-pushed the feature/add-available-balance-to-group-accounts branch from 988260d to 87f2264 Compare February 11, 2026 13:15
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