Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bpdm-cleaning): Removed assignment of uncategorized identifier while performing cleaning task process. #1098

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ For changes to the BPDM Helm charts please consult the [changelog](charts/bpdm/C
- BPDM Gate: Fixed logic for identifiers to retrieve only generic type on output business partner
- BPDM Gate: Fixed construction logic for states and identifiers by enabling business partner type
- BPDM Pool: When processing golden record tasks the Pool now ignores isCatenaXMemberData field if it is set to null. ([#1069](https://github.com/eclipse-tractusx/bpdm/issues/1069))
- BPDM Gate: Fixed gate output logic to provide states based on business partner type.
- BPDM Gate: Fixed gate output logic to provide states based on business partner type.
- BPDM Cleaning Service Dummy: Removed assignment of uncategorized identifier while performing cleaning task process.

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ class CleaningServiceDummy(

val cleanedBusinessPartner = BusinessPartner(
nameParts = businessPartner.nameParts,
uncategorized = businessPartner.uncategorized,
// Identifiers are taken as legal identifiers and should be removed from uncategorized collection
uncategorized = businessPartner.uncategorized.copy(identifiers = emptyList()),
owningCompany = businessPartner.owningCompany,
legalEntity = cleanLegalEntity(businessPartner, sharedByOwner),
site = cleanSite(businessPartner, sharedByOwner),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
.copyWithBpnReferences(BpnReference.empty)
.copyWithLegalAddress(PostalAddress.empty)
.copyWithSiteMainAddress(PostalAddress.empty)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList() // Assign empty list to uncategorized identifiers
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand Down Expand Up @@ -130,6 +135,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
val mockedBusinessPartner = businessPartnerFactory.createFullBusinessPartner("test")
.copyWithLegalAddress(PostalAddress.empty)
.copyWithSiteMainAddress(PostalAddress.empty)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList() // Assign empty list to uncategorized identifiers
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand Down Expand Up @@ -158,6 +168,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
.copyWithBpnReferences(BpnReference.empty)
.copyWithLegalAddress(PostalAddress.empty)
.copy(site = null)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList() // Assign empty list to uncategorized identifiers
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand Down Expand Up @@ -185,6 +200,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
val mockedBusinessPartner = businessPartnerFactory.createFullBusinessPartner("test")
.copyWithLegalAddress(PostalAddress.empty)
.copy(site = null)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList() // Assign empty list to uncategorized identifiers
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand Down Expand Up @@ -212,6 +232,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
.copyWithBpnReferences(BpnReference.empty)
.copyWithLegalAddress(PostalAddress.empty)
.copy(additionalAddress = null)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList()
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand Down Expand Up @@ -239,6 +264,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
val mockedBusinessPartner = businessPartnerFactory.createFullBusinessPartner("test")
.copyWithLegalAddress(PostalAddress.empty)
.copy(additionalAddress = null)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList() // Assign empty list to uncategorized identifiers
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand Down Expand Up @@ -266,6 +296,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
.copyWithBpnReferences(BpnReference.empty)
.copyWithSiteMainAddress(null)
.copy(additionalAddress = null)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList() // Assign empty list to uncategorized identifiers
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand All @@ -292,6 +327,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
val mockedBusinessPartner = businessPartnerFactory.createFullBusinessPartner("test")
.copyWithSiteMainAddress(null)
.copy(additionalAddress = null)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList() // Assign empty list to uncategorized identifiers
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand All @@ -318,6 +358,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
.copyWithBpnReferences(BpnReference.empty)
.copyWithLegalAddress(PostalAddress.empty)
.copy(site = null, additionalAddress = null)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList() // Assign empty list to uncategorized identifiers
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand Down Expand Up @@ -345,6 +390,11 @@ class CleaningServiceApiCallsTest @Autowired constructor(
val mockedBusinessPartner = businessPartnerFactory.createFullBusinessPartner("test")
.copyWithLegalAddress(PostalAddress.empty)
.copy(site = null, additionalAddress = null)
.copy(
uncategorized = businessPartnerFactory.createFullBusinessPartner("test").uncategorized.copy(
identifiers = emptyList() // Assign empty list to uncategorized identifiers
)
)

val resolveMapping = mockOrchestratorResolveApi()
mockOrchestratorReserveApi(mockedBusinessPartner)
Expand Down
Loading