RED-8854: Recategorization from formula/image/logo to signature is not displayed in report
This commit is contained in:
parent
455137131c
commit
c5b83bf6e0
@ -57,7 +57,7 @@ public class MigrationMessageReceiver {
|
|||||||
|
|
||||||
if (redactionLog.getAnalysisVersion() == 0) {
|
if (redactionLog.getAnalysisVersion() == 0) {
|
||||||
redactionLog = legacyVersion0MigrationService.mergeDuplicateAnnotationIds(redactionLog);
|
redactionLog = legacyVersion0MigrationService.mergeDuplicateAnnotationIds(redactionLog);
|
||||||
} else if (migrationRequest.getManualRedactions() != null) {
|
} else {
|
||||||
redactionLog = legacyRedactionLogMergeService.addManualAddEntriesAndRemoveSkippedImported(redactionLog,
|
redactionLog = legacyRedactionLogMergeService.addManualAddEntriesAndRemoveSkippedImported(redactionLog,
|
||||||
migrationRequest.getManualRedactions(),
|
migrationRequest.getManualRedactions(),
|
||||||
migrationRequest.getDossierTemplateId());
|
migrationRequest.getDossierTemplateId());
|
||||||
|
|||||||
@ -72,7 +72,7 @@ public class RedactionLogToEntityLogMigrationService {
|
|||||||
.collect(new MigratedIdsCollector());
|
.collect(new MigratedIdsCollector());
|
||||||
|
|
||||||
log.info("applying manual changes to migrated entities for file {}", fileId);
|
log.info("applying manual changes to migrated entities for file {}", fileId);
|
||||||
applyManualChanges(entitiesToMigrate, manualRedactions);
|
applyProcessedManualChanges(entitiesToMigrate, manualRedactions);
|
||||||
|
|
||||||
EntityLog entityLog = new EntityLog();
|
EntityLog entityLog = new EntityLog();
|
||||||
entityLog.setAnalysisNumber(redactionLog.getAnalysisNumber());
|
entityLog.setAnalysisNumber(redactionLog.getAnalysisNumber());
|
||||||
@ -117,7 +117,7 @@ public class RedactionLogToEntityLogMigrationService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void applyManualChanges(List<MigrationEntity> entitiesToMigrate, ManualRedactions manualRedactions) {
|
private void applyProcessedManualChanges(List<MigrationEntity> entitiesToMigrate, ManualRedactions manualRedactions) {
|
||||||
|
|
||||||
if (manualRedactions == null) {
|
if (manualRedactions == null) {
|
||||||
return;
|
return;
|
||||||
@ -130,6 +130,7 @@ public class RedactionLogToEntityLogMigrationService {
|
|||||||
manualRedactions.getLegalBasisChanges(),
|
manualRedactions.getLegalBasisChanges(),
|
||||||
manualRedactions.getRecategorizations())
|
manualRedactions.getRecategorizations())
|
||||||
.flatMap(Collection::stream)
|
.flatMap(Collection::stream)
|
||||||
|
.filter(manualChange -> manualChange.getProcessedDate() != null)
|
||||||
.collect(Collectors.groupingBy(BaseAnnotation::getAnnotationId));
|
.collect(Collectors.groupingBy(BaseAnnotation::getAnnotationId));
|
||||||
|
|
||||||
entitiesToMigrate.forEach(migrationEntity -> migrationEntity.applyManualChanges(manualChangesPerAnnotationId.getOrDefault(migrationEntity.getOldId(),
|
entitiesToMigrate.forEach(migrationEntity -> migrationEntity.applyManualChanges(manualChangesPerAnnotationId.getOrDefault(migrationEntity.getOldId(),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user