From 30715cdcb85e94911c3903fe95b1cb902ed6556f Mon Sep 17 00:00:00 2001 From: Timo Bejan Date: Thu, 5 Aug 2021 15:35:06 +0300 Subject: [PATCH] added user-id to all manual entries --- .../red/service/redaction/v1/model/RedactionLogEntry.java | 1 + .../server/redaction/service/RedactionLogMergeService.java | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/redaction-service-v1/redaction-service-api-v1/src/main/java/com/iqser/red/service/redaction/v1/model/RedactionLogEntry.java b/redaction-service-v1/redaction-service-api-v1/src/main/java/com/iqser/red/service/redaction/v1/model/RedactionLogEntry.java index 9f7a0146..38497fa5 100644 --- a/redaction-service-v1/redaction-service-api-v1/src/main/java/com/iqser/red/service/redaction/v1/model/RedactionLogEntry.java +++ b/redaction-service-v1/redaction-service-api-v1/src/main/java/com/iqser/red/service/redaction/v1/model/RedactionLogEntry.java @@ -36,6 +36,7 @@ public class RedactionLogEntry { private boolean manual; private Status status; private ManualRedactionType manualRedactionType; + private String manualRedactionUserId; private boolean isDictionaryEntry; private String textBefore; 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 52ca7f10..cade6618 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 @@ -61,6 +61,7 @@ public class RedactionLogMergeService { redactionLogEntry.setStatus(Status.DECLINED); } + redactionLogEntry.setManualRedactionUserId(recategorization.getUser()); redactionLogEntry.setReason(manualOverrideReason); redactionLogEntry.setManual(true); redactionLogEntry.setManualRedactionType(ManualRedactionType.RECATEGORIZE); @@ -88,6 +89,7 @@ public class RedactionLogMergeService { redactionLogEntry.setReason(manualOverrideReason); redactionLogEntry.setManual(true); + redactionLogEntry.setManualRedactionUserId(manualRemoval.getUser()); redactionLogEntry.setManualRedactionType(ManualRedactionType.REMOVE); redactionLogEntry.setDictionaryEntry(manualRemoval.isRemoveFromDictionary()); redactionLogEntry.setDossierDictionaryEntry(manualRemoval.isRemoveFromDictionary()); @@ -114,6 +116,7 @@ public class RedactionLogMergeService { redactionLogEntry.setStatus(Status.DECLINED); } + redactionLogEntry.setManualRedactionUserId(manualForceRedact.getUser()); redactionLogEntry.setReason(manualOverrideReason); redactionLogEntry.setManual(true); redactionLogEntry.setManualRedactionType(ManualRedactionType.FORCE_REDACT); @@ -139,6 +142,7 @@ public class RedactionLogMergeService { redactionLogEntry.setStatus(Status.DECLINED); } + redactionLogEntry.setManualRedactionUserId(manualLegalBasisChange.getUser()); redactionLogEntry.setReason(manualOverrideReason); redactionLogEntry.setManual(true); redactionLogEntry.setManualRedactionType(ManualRedactionType.LEGAL_BASIS_CHANGE); @@ -209,6 +213,7 @@ public class RedactionLogMergeService { .manual(true) .status(manualRedactionEntry.getStatus()) .manualRedactionType(ManualRedactionType.ADD) + .manualRedactionUserId(manualRedactionEntry.getUser()) .build(); }