Skip to content

FINERACT-2692: Fix missing externalId for Groups and Centers#6141

Open
rymghosn wants to merge 2 commits into
apache:developfrom
foodeveloper:port/CBS-762-external-id-missing-groups-centers
Open

FINERACT-2692: Fix missing externalId for Groups and Centers#6141
rymghosn wants to merge 2 commits into
apache:developfrom
foodeveloper:port/CBS-762-external-id-missing-groups-centers

Conversation

@rymghosn

@rymghosn rymghosn commented Jul 16, 2026

Copy link
Copy Markdown

Groups and Centers created without an explicit externalId were left with a blank/null value instead of one being generated, unlike Client creation which already auto-generates one. Separately, the externalId field was missing from the CenterData domain model's accessors and from the Swagger schemas for the Centers/Groups APIs, so it wasn't reliably surfaced in responses or generated API docs/clients.

This PR (https://issues.apache.org/jira/browse/FINERACT-2692):

 - Adds the missing `getExternalId()` accessor to `CenterData`.                                                                                 
 - Documents `externalId` in the `CentersApiResourceSwagger` and `GroupsApiResourceSwagger` response schemas.                                   
 - Generates a random `externalId` in `GroupingTypesWritePlatformServiceJpaRepositoryImpl#createGroupingType` when none is supplied on Group/Center creation, consistent with Client behavior.                                                                                        
 - Makes the read paths in `AllGroupTypesDataMapper` and `CenterReadPlatformServiceImpl` fall back to a non-null placeholder when reading a blank `externalId` from existing data.                                                                                                         

Test plan

Added integration test coverage:

  • CenterIntegrationTest#testCenterCreationWithoutExternalIdGeneratesOne -GroupTest#testGroupCreationWithoutExternalIdGeneratesOne
  • GroupTest#testGroupCreationWithExternalIdIsPersisted

@rymghosn
rymghosn force-pushed the port/CBS-762-external-id-missing-groups-centers branch from 67b6fb3 to 02714c3 Compare July 16, 2026 12:59
Add the missing getExternalId() accessor on CenterData, document the
externalId field in the Centers/Groups Swagger schemas, and generate a
random externalId when one is not supplied on Group/Center creation
instead of leaving it blank, consistent with Client creation. Read
paths now fall back to a non-null placeholder for any pre-existing
blank values.

Adds integration test coverage for both the auto-generated and
explicitly-supplied externalId cases.

Signed-off-by: rym.ghosn <rym.ghosn@foo.mobi>
@rymghosn
rymghosn force-pushed the port/CBS-762-external-id-missing-groups-centers branch from 02714c3 to fee4bb9 Compare July 16, 2026 14:35
@IOhacker

Copy link
Copy Markdown
Contributor

@rymghosn could you please review the failing GitHub Actions?

…wline)

CentersApiResourceSwagger.java was missing a trailing newline, failing
:fineract-provider:spotlessJavaCheck in CI.

Signed-off-by: rym.ghosn <rym.ghosn@foo.mobi>
@rymghosn
rymghosn force-pushed the port/CBS-762-external-id-missing-groups-centers branch from ddd6e93 to 609ddbb Compare July 17, 2026 12:37
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.

2 participants