Move view field label identifier deletion validation into the cross entity validation (#19642)

## Introduction
In the same validate build and run we should be able to delete a view
field targetting a label identifier and at the same create one that
repoints to it again without failing any validation

Leading for this valdiation rule to be moved in the cross entity
validation steps
This commit is contained in:
Paul Rastoin
2026-04-13 16:38:27 +02:00
committed by GitHub
parent 12233e6c47
commit ce2723d6cf
5 changed files with 145 additions and 44 deletions
@@ -131,6 +131,10 @@ export class WorkspaceMigrationBuildOrchestratorService {
dependencyAllFlatEntityMaps,
});
const preDeletionFlatViewFieldMaps = structuredClone(
optimisticAllFlatEntityMaps.flatViewFieldMaps,
);
const {
flatObjectMetadataMaps,
flatViewFieldMaps,
@@ -818,12 +822,14 @@ export class WorkspaceMigrationBuildOrchestratorService {
}
}
const { objectMetadata } = crossEntityTransversalValidation({
const { objectMetadata, viewField } = crossEntityTransversalValidation({
optimisticUniversalFlatMaps: optimisticAllFlatEntityMaps,
orchestratorActionsReport,
preDeletionFlatViewFieldMaps,
});
orchestratorFailureReport.objectMetadata.push(...objectMetadata);
orchestratorFailureReport.viewField.push(...viewField);
const allErrors = Object.values(orchestratorFailureReport);