Skip to content

Commit f059339

Browse files
committed
Utilizing the new MovedToExpiredFolder attribute.
1 parent e45e982 commit f059339

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ServiceBackendConfigurationPlugin/Scheduler/Jobs/SearchListJob.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,6 +946,7 @@ await _sdkDbContext.Languages.SingleAsync(x =>
946946
.Where(x => x.WorkflowState != Constants.WorkflowStates.Removed)
947947
.Where(x => x.Deadline < DateTime.UtcNow)
948948
.Where(x => x.Deadline > changeDate)
949+
.Where(x => x.MovedToExpiredFolder == false)
949950
.AsNoTracking()
950951
.OrderBy(x => x.Deadline)
951952
.ToListAsync();
@@ -1002,7 +1003,8 @@ await _sdkDbContext.Languages.SingleAsync(x =>
10021003
await _core.UpdateDeployedeForm((int)theCase.MicrotingUid, site.ToString(), (int)folderAndFolderTranslation.folder.MicrotingUid, true);
10031004
Console.WriteLine($"Moved compliance case with id: {theCase.Id} to overdue folder");
10041005
var comp = await _backendConfigurationDbContext.Compliances.FirstAsync(x => x.Id == compliance.Id);
1005-
await comp.Delete(_backendConfigurationDbContext).ConfigureAwait(false);
1006+
comp.MovedToExpiredFolder = true;
1007+
await comp.Update(_backendConfigurationDbContext);
10061008
}
10071009
break;
10081010
}

0 commit comments

Comments
 (0)