RED-7599 - Always trigger reanalysis when removing manual redaction
This commit is contained in:
parent
662b52e00a
commit
3d8a33dfd1
@ -109,7 +109,6 @@ public class ManualRedactionService {
|
|||||||
public List<ManualAddResponse> addRemoveRedaction(String dossierId, String fileId, List<RemoveRedactionRequest> removeRedactionRequests) {
|
public List<ManualAddResponse> addRemoveRedaction(String dossierId, String fileId, List<RemoveRedactionRequest> removeRedactionRequests) {
|
||||||
|
|
||||||
var response = new ArrayList<ManualAddResponse>();
|
var response = new ArrayList<ManualAddResponse>();
|
||||||
var requiresReAnalysis = false;
|
|
||||||
var manualRedactions = manualRedactionProviderService.getManualRedactions(fileId);
|
var manualRedactions = manualRedactionProviderService.getManualRedactions(fileId);
|
||||||
|
|
||||||
//validate removing from dossier template dictionary
|
//validate removing from dossier template dictionary
|
||||||
@ -123,7 +122,6 @@ public class ManualRedactionService {
|
|||||||
if (manualAddRedactionsContains(manualRedactions, removeRedactionRequest.getAnnotationId())) {
|
if (manualAddRedactionsContains(manualRedactions, removeRedactionRequest.getAnnotationId())) {
|
||||||
log.info("hard delete ManualRedactions for file {} and annotation {}", fileId, removeRedactionRequest.getAnnotationId());
|
log.info("hard delete ManualRedactions for file {} and annotation {}", fileId, removeRedactionRequest.getAnnotationId());
|
||||||
manualRedactionProviderService.hardDeleteManualRedactions(fileId, removeRedactionRequest.getAnnotationId());
|
manualRedactionProviderService.hardDeleteManualRedactions(fileId, removeRedactionRequest.getAnnotationId());
|
||||||
requiresReAnalysis = true;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -144,14 +142,10 @@ public class ManualRedactionService {
|
|||||||
removedFromDictionary,
|
removedFromDictionary,
|
||||||
typeIdsOfModifiedDictionaries);
|
typeIdsOfModifiedDictionaries);
|
||||||
|
|
||||||
requiresReAnalysis = requiresReAnalysis || removedFromDictionary;
|
|
||||||
|
|
||||||
response.add(ManualAddResponse.builder().annotationId(removeRedactionRequest.getAnnotationId()).commentId(commentId).build());
|
response.add(ManualAddResponse.builder().annotationId(removeRedactionRequest.getAnnotationId()).commentId(commentId).build());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (requiresReAnalysis) {
|
reprocess(dossierId, fileId);
|
||||||
reprocess(dossierId, fileId);
|
|
||||||
}
|
|
||||||
|
|
||||||
analysisFlagsCalculationService.calculateFlags(dossierId, fileId);
|
analysisFlagsCalculationService.calculateFlags(dossierId, fileId);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user