Abhinav Cillanki created FINERACT-2237:
------------------------------------------
Summary: GSIM Account Creation Bug: Multiple Parent Accounts
Created Instead of Single GSIM Parent
Key: FINERACT-2237
URL: https://issues.apache.org/jira/browse/FINERACT-2237
Project: Apache Fineract
Issue Type: Bug
Reporter: Abhinav Cillanki
Attachments: Screenshot from 2025-04-05 10-59-51.png
When creating a Group Savings with Individual Monitoring (GSIM) account by
providing multiple clients in the {{{}clientArray{}}}, the expected behavior is:
* *One parent GSIM account* should be created for the specified group.
* *Individual child savings accounts* should be created for each client, all
referencing the single parent GSIM account ({{{}gsimId{}}}).
However, the current implementation incorrectly creates multiple GSIM parent
accounts, each associated with only one child account. As a result, instead of
one GSIM account linked to multiple individual client savings accounts,
multiple independent GSIM accounts are being created.
*Steps to Reproduce:*
# Send a POST request to
{code:java}
fineract-provider/api/v1/savingsaccounts/gsim{code}
with a payload containing multiple clients in {{{}clientArray{}}}. For example:
{code:java}
{ "clientArray": [ { "productId": 2, "submittedOnDate": "01 April
2025", "fieldOfficerId": "", "externalId": "",
"nominalAnnualInterestRate": 5, "interestCompoundingPeriodType": 1,
"interestPostingPeriodType": 4, "interestCalculationType": 1,
"interestCalculationDaysInYearType": 365, "withdrawalFeeForTransfers":
false, "lockinPeriodFrequency": "", "lockinPeriodFrequencyType": "",
"allowOverdraft": false, "enforceMinRequiredBalance": false,
"charges": [], "clientId": 12, "isGSIM": true,
"isParentAccount": true, "dateFormat": "dd MMMM yyyy",
"monthDayFormat": "dd MMMM", "locale": "en", "groupId": 9,
"applicationId":100 }, { "productId": 2, "submittedOnDate": "01
April 2025", "fieldOfficerId": "", "externalId": "",
"nominalAnnualInterestRate": 5, "interestCompoundingPeriodType": 1,
"interestPostingPeriodType": 4, "interestCalculationType": 1,
"interestCalculationDaysInYearType": 365, "withdrawalFeeForTransfers":
false, "lockinPeriodFrequency": "", "lockinPeriodFrequencyType": "",
"allowOverdraft": false, "enforceMinRequiredBalance": false,
"charges": [], "clientId": 13, "isGSIM": true,
"isParentAccount": false, "dateFormat": "dd MMMM yyyy",
"monthDayFormat": "dd MMMM", "locale": "en", "groupId": 9,
"applicationId":100 }, { "productId": 2, "submittedOnDate": "01
April 2025", "fieldOfficerId": "", "externalId": "",
"nominalAnnualInterestRate": 5, "interestCompoundingPeriodType": 1,
"interestPostingPeriodType": 4, "interestCalculationType": 1,
"interestCalculationDaysInYearType": 365, "withdrawalFeeForTransfers":
false, "lockinPeriodFrequency": "", "lockinPeriodFrequencyType": "",
"allowOverdraft": false, "enforceMinRequiredBalance": false,
"charges": [], "clientId": 14, "isGSIM": true,
"isParentAccount": false, "dateFormat": "dd MMMM yyyy",
"monthDayFormat": "dd MMMM", "locale": "en", "groupId": 9,
"applicationId":100 } ]}
{code}
*Expected Result:*
** One GSIM parent account linked with multiple child savings accounts (one
per client).
*Actual Result:*
** Multiple GSIM parent accounts are created, each with a single child savings
account.
** !Screenshot from 2025-04-05 10-59-51.png!
**
*Additional Notes:*
Existing unit tests in {{GroupSavingsIntegrationTest.java}} are deprecated and
do not cover multi-client scenarios.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)