From 9bdcf780862ef19fd2daa895be8d00b33ddf839b Mon Sep 17 00:00:00 2001 From: frank Date: Wed, 24 Jul 2024 14:44:06 -0500 Subject: [PATCH 1/2] add-message and update-advisor-approval send workflow messages --- .../java/org/tdl/vireo/controller/SubmissionController.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/org/tdl/vireo/controller/SubmissionController.java b/src/main/java/org/tdl/vireo/controller/SubmissionController.java index 9ec11b831..6dff4afce 100644 --- a/src/main/java/org/tdl/vireo/controller/SubmissionController.java +++ b/src/main/java/org/tdl/vireo/controller/SubmissionController.java @@ -946,6 +946,7 @@ public ApiResponse setSubmissionCorrectionsReceived(@WeaverUser User user, @Path @PreAuthorize("hasRole('STUDENT')") public ApiResponse addMessage(@WeaverUser User user, @PathVariable Long submissionId, @RequestBody String message) { Submission submission = submissionRepo.read(submissionId); + submissionEmailService.sendWorkflowEmails(user, submission.getId()); return new ApiResponse(SUCCESS, actionLogRepo.createPublicLog(submission, user, message)); } @@ -1113,6 +1114,8 @@ public ApiResponse updateAdvisorApproval(@PathVariable Long submissionId, @Reque actionLogRepo.createAdvisorPublicLog(submission, "Advisor comments : " + message); } + submissionEmailService.sendWorkflowEmails(user, submission.getId()); + return new ApiResponse(SUCCESS, submission); } From bc90685d369afd5984f521ddf1db0e1e396e253e Mon Sep 17 00:00:00 2001 From: frank Date: Wed, 24 Jul 2024 15:40:14 -0500 Subject: [PATCH 2/2] fix assignee --- .../java/org/tdl/vireo/controller/SubmissionController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/tdl/vireo/controller/SubmissionController.java b/src/main/java/org/tdl/vireo/controller/SubmissionController.java index 6dff4afce..6c2327115 100644 --- a/src/main/java/org/tdl/vireo/controller/SubmissionController.java +++ b/src/main/java/org/tdl/vireo/controller/SubmissionController.java @@ -1114,7 +1114,7 @@ public ApiResponse updateAdvisorApproval(@PathVariable Long submissionId, @Reque actionLogRepo.createAdvisorPublicLog(submission, "Advisor comments : " + message); } - submissionEmailService.sendWorkflowEmails(user, submission.getId()); + submissionEmailService.sendWorkflowEmails(submission.getAssignee(), submission.getId()); return new ApiResponse(SUCCESS, submission);