RED-8219 - Wrong notification type for approvers

- set the correct notification type depending on the approved status of the file

Signed-off-by: Corina Olariu <corina.olariu.ext@knecon.com>
This commit is contained in:
Corina Olariu 2024-02-01 20:21:08 +02:00
parent f6e38550bb
commit c843484ff0

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());
}