RED-7918 - RM-62: "Last Modified" date not updated after change

- update the timestamps for redactionModificationDate and lastManualChangeDate also in case of REMOVE_FROM_DICTIONARY
- remove the check for reason not empty
This commit is contained in:
Corina Olariu 2023-11-23 10:04:34 +02:00
parent fa06658ece
commit 52c1cfef6e
2 changed files with 17 additions and 2 deletions

View File

@ -63,10 +63,11 @@ public class AnalysisFlagsCalculationService {
if (entry.getManualChanges() != null && !entry.getManualChanges().isEmpty()) {
for (var manualChange : entry.getManualChanges()) {
if (!entry.isHint() && !entry.isRecommendation() && StringUtils.isNotEmpty(entry.getReason()) && (manualChange.getManualRedactionType()
if (!entry.isHint() && !entry.isRecommendation() && (manualChange.getManualRedactionType()
.equals(ManualRedactionType.ADD_LOCALLY) || manualChange.getManualRedactionType()
.equals(ManualRedactionType.RECATEGORIZE) || manualChange.getManualRedactionType()
.equals(ManualRedactionType.REMOVE_LOCALLY) || manualChange.getManualRedactionType()
.equals(ManualRedactionType.REMOVE_FROM_DICTIONARY) || manualChange.getManualRedactionType()
.equals(ManualRedactionType.FORCE_REDACT) || manualChange.getManualRedactionType()
.equals(ManualRedactionType.FORCE_HINT) || manualChange.getManualRedactionType()
.equals(ManualRedactionType.LEGAL_BASIS_CHANGE) || manualChange.getManualRedactionType()
@ -75,6 +76,20 @@ public class AnalysisFlagsCalculationService {
lastRedactionModification = manualChange.getProcessedDate();
}
if (!entry.isHint() && !entry.isRecommendation() && (manualChange.getManualRedactionType()
.equals(ManualRedactionType.ADD_LOCALLY) || manualChange.getManualRedactionType()
.equals(ManualRedactionType.RECATEGORIZE) || manualChange.getManualRedactionType()
.equals(ManualRedactionType.REMOVE_LOCALLY) || manualChange.getManualRedactionType()
.equals(ManualRedactionType.REMOVE_FROM_DICTIONARY) || manualChange.getManualRedactionType()
.equals(ManualRedactionType.FORCE_REDACT) || manualChange.getManualRedactionType()
.equals(ManualRedactionType.FORCE_HINT) || manualChange.getManualRedactionType()
.equals(ManualRedactionType.LEGAL_BASIS_CHANGE) || manualChange.getManualRedactionType()
.equals(ManualRedactionType.RESIZE)) && manualChange.getProcessedDate() == null && (lastRedactionModification == null || manualChange.getRequestedDate()
.isAfter(lastRedactionModification))) {
lastRedactionModification = manualChange.getRequestedDate();
}
if (manualChange.getProcessedDate() != null && (lastManualChangeDate == null || manualChange.getProcessedDate().isAfter(lastManualChangeDate))) {
lastManualChangeDate = manualChange.getProcessedDate();
}

View File

@ -25,7 +25,7 @@
</modules>
<properties>
<redaction-service.version>3.206.0</redaction-service.version>
<redaction-service.version>3.222.8</redaction-service.version>
<search-service.version>2.39.0</search-service.version>
<pdftron-redaction-service.version>3.157.0</pdftron-redaction-service.version>
<redaction-report-service.version>3.63.0</redaction-report-service.version>