diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f0f52e78..8116973a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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] diff --git a/bpdm-cleaning-service-dummy/src/main/kotlin/org/eclipse/tractusx/bpdm/cleaning/service/CleaningServiceDummy.kt b/bpdm-cleaning-service-dummy/src/main/kotlin/org/eclipse/tractusx/bpdm/cleaning/service/CleaningServiceDummy.kt index a5a9ca61f..93d9a34fa 100644 --- a/bpdm-cleaning-service-dummy/src/main/kotlin/org/eclipse/tractusx/bpdm/cleaning/service/CleaningServiceDummy.kt +++ b/bpdm-cleaning-service-dummy/src/main/kotlin/org/eclipse/tractusx/bpdm/cleaning/service/CleaningServiceDummy.kt @@ -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), diff --git a/bpdm-cleaning-service-dummy/src/test/kotlin/org/eclipse/tractusx/bpdm/cleaning/service/CleaningServiceApiCallsTest.kt b/bpdm-cleaning-service-dummy/src/test/kotlin/org/eclipse/tractusx/bpdm/cleaning/service/CleaningServiceApiCallsTest.kt index a290ea3ec..c2f1cb976 100644 --- a/bpdm-cleaning-service-dummy/src/test/kotlin/org/eclipse/tractusx/bpdm/cleaning/service/CleaningServiceApiCallsTest.kt +++ b/bpdm-cleaning-service-dummy/src/test/kotlin/org/eclipse/tractusx/bpdm/cleaning/service/CleaningServiceApiCallsTest.kt @@ -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) @@ -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) @@ -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) @@ -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) @@ -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) @@ -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) @@ -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) @@ -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) @@ -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) @@ -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)