RED-5809: updated processedTime when declining a requested image recategoration redaction
This commit is contained in:
parent
78bdb954e0
commit
bf5989e101
@ -78,10 +78,10 @@ public class ImageRecategorizationPersistenceService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public void markAsProcessed(String annotationId, String fileId) {
|
||||||
|
|
||||||
public void markAsProcessed(ManualImageRecategorization e) {
|
imageRecategorizationRepository.markAsProcessed(new AnnotationEntityId(annotationId, fileId), OffsetDateTime.now().truncatedTo(ChronoUnit.MILLIS));
|
||||||
|
|
||||||
imageRecategorizationRepository.markAsProcessed(new AnnotationEntityId(e.getAnnotationId(), e.getFileId()), OffsetDateTime.now().truncatedTo(ChronoUnit.MILLIS));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -659,7 +659,11 @@ public class ManualRedactionService {
|
|||||||
for (var annotationId : annotationIds) {
|
for (var annotationId : annotationIds) {
|
||||||
var imageRecategorization = recategorizationPersistenceService.findRecategorization(fileId, annotationId);
|
var imageRecategorization = recategorizationPersistenceService.findRecategorization(fileId, annotationId);
|
||||||
recategorizationPersistenceService.updateStatus(fileId, annotationId, annotationStatus);
|
recategorizationPersistenceService.updateStatus(fileId, annotationId, annotationStatus);
|
||||||
actionPerformed = actionPerformed || !(imageRecategorization.getStatus() == AnnotationStatus.REQUESTED && annotationStatus == AnnotationStatus.DECLINED);
|
boolean isDeclined = imageRecategorization.getStatus() == AnnotationStatus.REQUESTED && annotationStatus == AnnotationStatus.DECLINED;
|
||||||
|
actionPerformed = actionPerformed || !isDeclined;
|
||||||
|
if (isDeclined) {
|
||||||
|
recategorizationPersistenceService.markAsProcessed(annotationId, fileId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (actionPerformed) {
|
if (actionPerformed) {
|
||||||
@ -764,7 +768,7 @@ public class ManualRedactionService {
|
|||||||
if (manualRedactions.getImageRecategorization() != null) {
|
if (manualRedactions.getImageRecategorization() != null) {
|
||||||
manualRedactions.getImageRecategorization().forEach(e -> {
|
manualRedactions.getImageRecategorization().forEach(e -> {
|
||||||
if (!e.getStatus().equals(AnnotationStatus.REQUESTED) && e.getProcessedDate() == null) {
|
if (!e.getStatus().equals(AnnotationStatus.REQUESTED) && e.getProcessedDate() == null) {
|
||||||
recategorizationPersistenceService.markAsProcessed(e);
|
recategorizationPersistenceService.markAsProcessed(e.getAnnotationId(), e.getFileId());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user