Merge branch 'RED-8219' into 'master'

RED-8219 - Wrong notification type for approvers

Closes RED-8219

See merge request redactmanager/persistence-service!331
This commit is contained in:
Corina Olariu 2024-02-02 10:17:07 +01:00
commit 998a0710cd

View File

@ -194,7 +194,7 @@ public class StatusController implements StatusResource {
notificationPersistenceService.insertNotification(AddNotificationRequest.builder()
.userId(assigneeId)
.issuerId(KeycloakSecurity.getUserId())
.notificationType(NotificationType.ASSIGN_REVIEWER.name())
.notificationType(WorkflowStatus.APPROVED.equals(fileStatus.getWorkflowStatus()) ? NotificationType.ASSIGN_APPROVER.name() : NotificationType.ASSIGN_REVIEWER.name())
.target(Map.of(DOSSIER_ID, dossierId, FILE_ID, fileId, FILE_NAME, fileStatus.getFilename()))
.build());
}