Pull request #151: RED-4176: Fixed remove all decline annotations

Merge in RED/redaction-report-service from RED-4176 to master

* commit '177aab4cfd54c9268934c167668ab222e50131f4':
  RED-4176: Fixed remove all decline annotations
This commit is contained in:
Dominique Eiflaender 2022-06-10 12:53:02 +02:00
commit 4d8f33e5bc

View File

@ -206,17 +206,7 @@ public class ReportGenerationService {
RedactionLog redactionLog;
try {
redactionLog = redactionLogClient.getRedactionLog(dossierId, fileId, new ArrayList<>(), true, false);
//filter DECLINED redactions out, they should not be in reports
Iterator<RedactionLogEntry> iter = redactionLog.getRedactionLogEntry().iterator();
while (iter.hasNext()) {
RedactionLogEntry redactionLogEntry = iter.next();
for (ManualChange manualChange : redactionLogEntry.getManualChanges()) {
if (manualChange.getAnnotationStatus().equals(AnnotationStatus.DECLINED)) {
iter.remove();
}
}
}
} catch (StorageObjectDoesNotExist e) {
return new ArrayList<>();
}