RED-2861: Ported changes for rectangle redaction improvements

This commit is contained in:
deiflaender 2021-11-30 12:47:22 +01:00
parent 8d881d4ca6
commit 7b1c9c97e6
3 changed files with 6 additions and 1 deletions

View File

@ -12,7 +12,7 @@
<artifactId>redaction-service-api-v1</artifactId> <artifactId>redaction-service-api-v1</artifactId>
<properties> <properties>
<persistence-service.version>0.103.0</persistence-service.version> <persistence-service.version>0.121.0</persistence-service.version>
</properties> </properties>
<dependencies> <dependencies>

View File

@ -26,6 +26,7 @@ public class RedactionLogEntry {
private String value; private String value;
private String reason; private String reason;
private int matchedRule; private int matchedRule;
private boolean rectangle;
private String legalBasis; private String legalBasis;
private boolean redacted; private boolean redacted;
private boolean isHint; private boolean isHint;

View File

@ -195,6 +195,9 @@ public class RedactionLogMergeService {
if (manualLegalBasisChange.getSection() != null) { if (manualLegalBasisChange.getSection() != null) {
redactionLogEntry.setSection(manualLegalBasisChange.getSection()); redactionLogEntry.setSection(manualLegalBasisChange.getSection());
} }
if (redactionLogEntry.isRectangle() && manualLegalBasisChange.getValue() != null) {
redactionLogEntry.setValue(manualLegalBasisChange.getValue());
}
} else if (manualLegalBasisChange.getStatus().equals(AnnotationStatus.REQUESTED)) { } else if (manualLegalBasisChange.getStatus().equals(AnnotationStatus.REQUESTED)) {
manualOverrideReason = mergeReasonIfNecessary(redactionLogEntry.getReason(), ", legal basis change requested"); manualOverrideReason = mergeReasonIfNecessary(redactionLogEntry.getReason(), ", legal basis change requested");
redactionLogEntry.setStatus(AnnotationStatus.REQUESTED); redactionLogEntry.setStatus(AnnotationStatus.REQUESTED);
@ -311,6 +314,7 @@ public class RedactionLogMergeService {
.status(manualRedactionEntry.getStatus()) .status(manualRedactionEntry.getStatus())
.manualRedactionType(ManualRedactionType.ADD) .manualRedactionType(ManualRedactionType.ADD)
.manualRedactionUserId(manualRedactionEntry.getUser()) .manualRedactionUserId(manualRedactionEntry.getUser())
.rectangle(manualRedactionEntry.isRectangle())
.build(); .build();
} }