Skip to content

Commit

Permalink
fix(bpdm-clearing): refactored construction logic for legal entity st…
Browse files Browse the repository at this point in the history
…ates.
  • Loading branch information
SujitMBRDI committed Sep 24, 2024
1 parent 5ae34d1 commit ac9d472
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ For changes to the BPDM Helm charts please consult the [changelog](charts/bpdm/C
- BPDM Gate: Improved error response by adding external id details and reduced csv columns by removing support for uncategorized fields in csv file for partner upload process([#700](https://github.com/eclipse-tractusx/sig-release/issues/700))
- BPDM Cleaning Service Dummy: Added a null check for name parts to ensure proper whitespace handling when constructing the legal name from them.
- BPDM Gate: Enabled Tax Jurisdiction code to save it to the Output.
- BPDM Cleaning Service Dummy: Removed assignment of uncategorized states while performing cleaning legal entity process.

## [6.1.0] - [2024-07-15]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class CleaningServiceDummy(
bpnReference = bpnReference.toRequestIfNotBpn(businessPartner.legalEntityReference()),
legalName = legalName ?: businessPartner.uncategorized.nameParts.takeIf { it.isNotEmpty() }?.joinToString(" "),
identifiers = identifiers.takeIf { it.isNotEmpty() } ?: businessPartner.uncategorized.identifiers,
states = states.takeIf { it.isNotEmpty() } ?: businessPartner.uncategorized.states,
states = states,
confidenceCriteria = dummyConfidenceCriteria.copy(sharedByOwner = sharedByOwner),
hasChanged = businessPartner.type == GoldenRecordType.LegalEntity,
isCatenaXMemberData = sharedByOwner,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class BusinessPartnerMappings {
externalId = entity.sharingState.externalId,
nameParts = entity.nameParts,
identifiers = entity.identifiers.map(::toIdentifierDto),
states = entity.states.map(::toStateDto),
states = entity.states.filter { it.businessPartnerTyp == BusinessPartnerType.GENERIC }.map(::toStateDto),
roles = entity.roles,
isOwnCompanyData = entity.isOwnCompanyData,
legalEntity = toLegalEntityComponentInputDto(entity),
Expand Down

0 comments on commit ac9d472

Please sign in to comment.