Merge branch 'RED-8854' into 'release/4.244.x'
RED-8854: Recategorization from formula/image/logo to signature is not displayed in report See merge request redactmanager/redaction-service!342
This commit is contained in:
commit
0e4e615d4a
@ -57,7 +57,7 @@ public class MigrationMessageReceiver {
|
||||
|
||||
if (redactionLog.getAnalysisVersion() == 0) {
|
||||
redactionLog = legacyVersion0MigrationService.mergeDuplicateAnnotationIds(redactionLog);
|
||||
} else if (migrationRequest.getManualRedactions() != null) {
|
||||
} else {
|
||||
redactionLog = legacyRedactionLogMergeService.addManualAddEntriesAndRemoveSkippedImported(redactionLog,
|
||||
migrationRequest.getManualRedactions(),
|
||||
migrationRequest.getDossierTemplateId());
|
||||
|
||||
@ -72,7 +72,7 @@ public class RedactionLogToEntityLogMigrationService {
|
||||
.collect(new MigratedIdsCollector());
|
||||
|
||||
log.info("applying manual changes to migrated entities for file {}", fileId);
|
||||
applyManualChanges(entitiesToMigrate, manualRedactions);
|
||||
applyProcessedManualChanges(entitiesToMigrate, manualRedactions);
|
||||
|
||||
EntityLog entityLog = new EntityLog();
|
||||
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) {
|
||||
return;
|
||||
@ -130,6 +130,7 @@ public class RedactionLogToEntityLogMigrationService {
|
||||
manualRedactions.getLegalBasisChanges(),
|
||||
manualRedactions.getRecategorizations())
|
||||
.flatMap(Collection::stream)
|
||||
.filter(manualChange -> manualChange.getProcessedDate() != null)
|
||||
.collect(Collectors.groupingBy(BaseAnnotation::getAnnotationId));
|
||||
|
||||
entitiesToMigrate.forEach(migrationEntity -> migrationEntity.applyManualChanges(manualChangesPerAnnotationId.getOrDefault(migrationEntity.getOldId(),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user