You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "Ralph Hopman (Jira)" <ji...@apache.org> on 2025/11/05 08:01:00 UTC
[jira] [Created] (FINERACT-2408) Empty entityStatus returned for SAVING and SHARE entities in search API
Ralph Hopman created FINERACT-2408:
--------------------------------------
Summary: Empty entityStatus returned for SAVING and SHARE entities in search API
Key: FINERACT-2408
URL: https://issues.apache.org/jira/browse/FINERACT-2408
Project: Apache Fineract
Issue Type: Bug
Components: Savings, Shares
Affects Versions: 1.13.0
Reporter: Ralph Hopman
When calling the /v1/search API endpoint, entities of type SAVING and SHARE always return an empty status object in the response:
{code:java}
{
"entityStatus": {
"id": 0,
"code": "",
"value": ""
}
}{code}
h2. Root cause
The {{SearchMapper.mapRow()}} method in {{SearchReadPlatformServiceImpl}} has specific handling for client, group, and loan entity types, but is missing proper handling for "saving" and "share" entity types. These entities fall through to the default case where {{entityStatus}} remains as an empty {{{}EnumOptionData(0L, "", ""){}}}.
h2. Expected Behavior
Both savings and share entities returned by the search API should include complete status information with proper id, code, and value fields populated based on their actual account status.
h2. Proposed Solution
Add missing entity type handling in the {{SearchMapper.mapRow()}} method:
# Import the required {{SharesEnumerations}} utility class
# Add proper handling for "saving" entity types:
** Get the {{SavingsAccountStatusEnumData}} using {{SavingsEnumerations.status()}}
** Convert it to {{EnumOptionData}} using the status data's id, code, and value
# Add proper handling for "share" entity types:
** Get the {{ShareAccountStatusEnumData}} using {{SharesEnumerations.status()}}
** Convert it to {{EnumOptionData}} using the status data's id, code, and value
--
This message was sent by Atlassian Jira
(v8.20.10#820010)