diff --git a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/redaction/service/RedactionLogMergeService.java b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/redaction/service/RedactionLogMergeService.java index ce09f06c..406d01e8 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/redaction/service/RedactionLogMergeService.java +++ b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/redaction/service/RedactionLogMergeService.java @@ -37,6 +37,7 @@ public class RedactionLogMergeService { processRedactionLogEntry(manualRedactionWrappers.stream().filter(mr -> entry.getId().equals(mr.getId())) .collect(Collectors.toList()), dossierTemplateId, entry); + entry.setComments(manualRedactions.getComments().get(entry.getId())); } @@ -47,30 +48,30 @@ public class RedactionLogMergeService { private List createManualRedactionWrappers(ManualRedactions manualRedactions) { + log.info("Processing Manual Redactions: {}", manualRedactions); + List manualRedactionWrappers = new ArrayList<>(); - log.info("Processing Manual Redactions: {}", manualRedactions); - manualRedactions.getImageRecategorizations().forEach(item -> { - if (item.getSoftDeletedTime() == null) { + if (item.getSoftDeletedTime() != null) { manualRedactionWrappers.add(new ManualRedactionWrapper(item.getId(), item.getRequestDate(), item)); } }); manualRedactions.getIdsToRemove().forEach(item -> { - if (item.getSoftDeletedTime() == null) { + if (item.getSoftDeletedTime() != null) { manualRedactionWrappers.add(new ManualRedactionWrapper(item.getId(), item.getRequestDate(), item)); } }); manualRedactions.getForceRedacts().forEach(item -> { - if (item.getSoftDeletedTime() == null) { + if (item.getSoftDeletedTime() != null) { manualRedactionWrappers.add(new ManualRedactionWrapper(item.getId(), item.getRequestDate(), item)); } }); manualRedactions.getManualLegalBasisChanges().forEach(item -> { - if (item.getSoftDeletedTime() == null) { + if (item.getSoftDeletedTime() != null) { manualRedactionWrappers.add(new ManualRedactionWrapper(item.getId(), item.getRequestDate(), item)); } }); @@ -84,6 +85,8 @@ public class RedactionLogMergeService { private void processRedactionLogEntry(List manualRedactionWrappers, String dossierTemplateId, RedactionLogEntry redactionLogEntry) { + log.info("Processing: {} for: {}", manualRedactionWrappers, redactionLogEntry); + manualRedactionWrappers.forEach(mrw -> { if (mrw.getItem() instanceof ManualImageRecategorization) { @@ -287,3 +290,4 @@ public class RedactionLogMergeService { } +