danhandev opened a new pull request, #6780: URL: https://github.com/apache/fineract/pull/6780
## Description Fixes [FINERACT-3018](https://issues.apache.org/jira/browse/FINERACT-3018). **Original issue** Submitting a fixed deposit application looked up the account number format with `EntityAccountType.CLIENT`, while recurring deposits, savings accounts and accounts reinvested on maturity use `EntityAccountType.SAVINGS`. A fixed deposit therefore got the client prefix (e.g. `Head Offic000000002`), or no prefix at all when the client format uses the client type, which a savings account cannot supply. **What changed** - `DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl.submitFDApplication` now uses `EntityAccountType.SAVINGS`, like `submitRDApplication`. - `accountNo` in the fixed and recurring deposit account responses (`GetFixedDepositAccountsResponse`, `GetFixedDepositAccountsAccountIdResponse`, `GetRecurringDepositAccountsResponse`, `GetRecurringDepositAccountsAccountIdResponse`), and `accountNumber` in the interest chart nested in the single-account responses (`GetFixedDepositAccountsAccountChart`, `GetRecurringDepositAccountsAccountChart`), are documented as strings. The server already returns strings (the Swagger examples are `"FD000023"` / `"000000001"`); with `Long` the generated clients drop the leading zeros and fail to read the whole response once the number has a prefix, so the test could not check it (integration-feign IT-05). Same fix as FINERACT-2883 did for other `accountNo` fields. **Breaking changes** - Behaviour: fixed deposits submitted after this change are numbered with the savings format. Existing account numbers are not changed. An installation that relied on fixed deposits picking up the client format will see new fixed deposits numbered like other savings accounts. Worth a line in the release notes. - API spec: the type change in the six response schemas above is reported by the API compatibility check (R015, property type changed in a response schema). It is intentional: the documented type did not match what the server returns. Consumers of the generated clients get `String` instead of `Long` from `getAccountNo()` / `getAccountNumber()` on these models. **How it is covered** `AccountNumberPreferencesTest` now also submits a fixed deposit and a recurring deposit, with and without account number preferences, and checks they follow the savings preference, as it already does for savings accounts. Without the fix the fixed deposit check fails (no prefix, 9 characters instead of the office name prefix + 9 digits). **Out of scope** Other response schemas still document `accountNo` as `Long` (account transfers, standing instructions, group and center accounts, fixed deposit transactions, post-dated checks). They are not used by this test; happy to fix them in a follow-up ticket. ## Checklist - [x] Write the commit message as per [our guidelines](https://github.com/apache/fineract/blob/develop/CONTRIBUTING.md#pull-requests) - [x] 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. - [x] Create/update [unit or integration tests](https://fineract.apache.org/docs/current/#_testing) for verifying the changes made. - [x] Follow our [coding conventions](https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions). - [x] 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 (Swagger updated; apiLive.htm already shows `accountNo` as a string, e.g. `"RD000023"`) - [x] [This PR must not be a "code dump"](https://cwiki.apache.org/confluence/display/FINERACT/Pull+Request+Size+Limit). Large changes can be made in a branch, with assistance. Ask for help on the [developer mailing list](https://fineract.apache.org/#contribute). - [x] If merging this PR resolves a JIRA issue, I will mark that issue as resolved and set "Fix Version/s" appropriately. - [x] I followed the [AI Policy](https://github.com/apache/fineract/blob/develop/CONTRIBUTING.md#ai-policy). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
