Merge branch 'RED-7768-2-3.6' into 'release/1.363.x'

RED-7768: Fixed double counting of deleted documents in license 2

See merge request redactmanager/persistence-service!182
This commit is contained in:
Christoph Schabert 2023-10-16 15:44:10 +02:00
commit cd891a2e14

View File

@ -66,7 +66,7 @@ public class LicenseReportService {
if (file.getDeleted() != null && file.getDeleted().toInstant().isBefore(licenseReportRequest.getEndDate())) {
softDeletes.computeIfAbsent(YearMonth.from(file.getDeleted()), entry -> new HashSet<>()).add(file);
}
if(dossiersById.get(file.getDossierId()).getSoftDeletedTime() != null && dossiersById.get(file.getDossierId()).getSoftDeletedTime().toInstant().isBefore(licenseReportRequest.getEndDate())){
if(file.getDeleted() == null && dossiersById.get(file.getDossierId()).getSoftDeletedTime() != null && dossiersById.get(file.getDossierId()).getSoftDeletedTime().toInstant().isBefore(licenseReportRequest.getEndDate())){
softDeletes.computeIfAbsent(YearMonth.from(dossiersById.get(file.getDossierId()).getSoftDeletedTime()), entry -> new HashSet<>()).add(file);
}
if (file.getHardDeletedTime() != null && file.getHardDeletedTime().toInstant().isBefore(licenseReportRequest.getEndDate())) {