Merge branch 'RED-9782-fix-bp' into 'release/2.465.x'

RED-9782:Automated Analysis should be disabled when uploading a document that...

See merge request redactmanager/persistence-service!660
This commit is contained in:
Maverick Studer 2024-08-12 18:40:34 +02:00
commit e2eb0d1047
2 changed files with 7 additions and 4 deletions

View File

@ -296,7 +296,9 @@ public class FileStatusService {
.fileAttributes(convertAttributes(fileEntity.getFileAttributes(), dossier.getDossierTemplateId()))
.build();
if (fileEntity.isExcludedFromAutomaticAnalysis() && fileManagementStorageService.objectExists(dossierId, fileId, FileType.IMPORTED_REDACTIONS)) {
if (fileEntity.isExcludedFromAutomaticAnalysis() && !manualRedactionReanalyse && fileManagementStorageService.objectExists(dossierId,
fileId,
FileType.IMPORTED_REDACTIONS)) {
analyseRequest.setMessageType(MessageType.IMPORTED_REDACTIONS_ONLY);
}

View File

@ -144,7 +144,7 @@ public class ManualRedactionMapper {
.comment(forceRedactionRequestModel.getComment())
.build();
if (!entityLogEntry.getEngines().contains(Engine.MANUAL) && entryIsEntityType(entityLogEntry)) {
if (!entityLogEntry.getEngines().contains(Engine.MANUAL) && !entityLogEntry.getEngines().contains(Engine.IMPORTED) && entryIsEntityType(entityLogEntry)) {
manualRedactionEntryConsumer.accept(entityLogEntry);
}
@ -174,7 +174,7 @@ public class ManualRedactionMapper {
.value(legalBasisChangeRequest.getValue())
.build();
if (!entityLogEntry.getEngines().contains(Engine.MANUAL) && entryIsEntityType(entityLogEntry)) {
if (!entityLogEntry.getEngines().contains(Engine.MANUAL) && !entityLogEntry.getEngines().contains(Engine.IMPORTED) && entryIsEntityType(entityLogEntry)) {
manualRedactionEntryConsumer.accept(entityLogEntry);
}
@ -244,6 +244,7 @@ public class ManualRedactionMapper {
.build();
if (!entityLogEntry.getEngines().contains(Engine.MANUAL)
&& !entityLogEntry.getEngines().contains(Engine.IMPORTED)
&& !recategorizationRequest.isAddToAllDossiers()
&& !recategorizationRequest.isAddToDictionary()
&& entryIsEntityType(entityLogEntry)) {
@ -314,7 +315,7 @@ public class ManualRedactionMapper {
.build();
if (!entityLogEntry.getEngines().contains(Engine.MANUAL)
&& entryIsEntityType(entityLogEntry)
&& !entityLogEntry.getEngines().contains(Engine.IMPORTED)
&& !request.isAddToAllDossiers()
&& !request.getUpdateDictionary()
&& entryIsEntityType(entityLogEntry)) {