RED-8956: Fixed endless loop when flag calculation is required and file is deleted #447

Merged
dominique.eiflaender1 merged 1 commits from RED-8956 into master 2024-04-15 11:19:05 +02:00

View File

@ -374,7 +374,8 @@ public interface FileRepository extends JpaRepository<FileEntity, String> {
select distinct f.id, f.dossierId
from FileEntity f
left join ViewedPageEntity v on f.id = v.file.id and v.id.userId = f.assignee
where (f.lastFlagCalculation is NULL and f.lastProcessed is not NULL) or f.lastManualChangeDate > f.lastFlagCalculation or f.lastProcessed > f.lastFlagCalculation or f.lastFlagCalculation < v.viewedTime
where f.deleted is NULL and f.hardDeletedTime is NULL
and ((f.lastFlagCalculation is NULL and f.lastProcessed is not NULL) or f.lastManualChangeDate > f.lastFlagCalculation or f.lastProcessed > f.lastFlagCalculation or f.lastFlagCalculation < v.viewedTime)
""")
List<Tuple> getFileIdentifiersWhereAnalysisFlagCalculationIsRequired();