Skip to content

Commit 85b4eb6

Browse files
committed
CLAP-294 Style: 이메일 제목 템플릿 수정
<footer> - 관련: #350
1 parent df26ddc commit 85b4eb6

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

src/main/java/clap/server/adapter/outbound/api/EmailTemplateBuilder.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,29 +21,29 @@ public EmailTemplate createWebhookTemplate(PushNotificationTemplate request) {
2121
switch (request.notificationType()) {
2222
case TASK_REQUESTED:
2323
templateName = "task-request";
24-
subject = "[TaskFlow 알림] 신규 작업이 요청되었습니다.";
24+
subject = "[TaskFlow] 신규 작업"+ request.taskName()+ "요청되었습니다.";
2525
context.setVariable("taskDetailUrl", taskDetailUrl);
2626
context.setVariable("receiverName", request.senderName());
2727
context.setVariable("title", request.taskName());
2828
break;
2929
case STATUS_SWITCHED:
3030
templateName = "status-switched";
31-
subject = "[TaskFlow 알림] 작업 상태가 변경되었습니다.";
31+
subject = "[TaskFlow] "+ request.taskName()+ " " + request.message()+ "으로 변경되었습니다.";
3232
context.setVariable("taskDetailUrl", taskDetailUrl);
3333
context.setVariable("receiverName", request.senderName());
3434
context.setVariable("title", request.taskName());
35-
context.setVariable("status", request.status());
35+
context.setVariable("status", request.message());
3636
break;
3737
case PROCESSOR_CHANGED:
3838
templateName = "processor-changed";
39-
subject = "[TaskFlow 알림] 작업 담당자가 변경되었습니다.";
39+
subject = "[TaskFlow] "+ request.taskName()+ "담당자" + request.message() + " 변경되었습니다.";
4040
context.setVariable("taskDetailUrl", taskDetailUrl);
4141
context.setVariable("processorName", request.message());
4242
context.setVariable("title", request.taskName());
4343
break;
4444
case PROCESSOR_ASSIGNED:
4545
templateName = "processor-assigned";
46-
subject = "[TaskFlow 알림] 작업 담당자가 지정되었습니다.";
46+
subject = "[TaskFlow] "+ request.taskName()+ "담당자" + request.message() + " 지정되었습니다..";
4747
context.setVariable("taskDetailUrl", taskDetailUrl);
4848
context.setVariable("processorName", request.message());
4949
context.setVariable("title", request.taskName());

src/main/java/clap/server/adapter/outbound/api/dto/PushNotificationTemplate.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ public record PushNotificationTemplate(
77
String email,
88
NotificationType notificationType,
99
String taskName,
10-
String status,
1110
String senderName,
1211
String message,
1312
String commenterName

src/main/java/clap/server/application/service/task/UpdateTaskService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public void updateTaskStatus(Long memberId, Long taskId, TaskStatus taskStatus)
8383
Task updateTask = taskService.upsert(task);
8484
TaskHistory taskHistory = TaskHistory.createTaskHistory(TaskHistoryType.STATUS_SWITCHED, task, taskStatus.getDescription(), null,null);
8585
commandTaskHistoryPort.save(taskHistory);
86-
publishNotification(updateTask, NotificationType.STATUS_SWITCHED, String.valueOf(updateTask.getTaskStatus()));
86+
publishNotification(updateTask, NotificationType.STATUS_SWITCHED, updateTask.getTaskStatus().getDescription());
8787
}
8888
}
8989

src/main/java/clap/server/application/service/webhook/SendNotificationService.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public void sendPushNotification(Member receiver, NotificationType notificationT
3434
Notification notification = createTaskNotification(task, receiver, notificationType, message, taskTitle);
3535

3636
PushNotificationTemplate pushNotificationTemplate = new PushNotificationTemplate(
37-
email, notificationType, taskTitle, task.getTaskStatus().getDescription(), requesterNickname, message, commenterName
37+
email, notificationType, taskTitle, requesterNickname, message, commenterName
3838
);
3939

4040
CompletableFuture<Void> saveNotification = CompletableFuture.runAsync(() -> {
@@ -69,7 +69,6 @@ public void sendAgitNotification(NotificationType notificationType,
6969
null,
7070
notificationType,
7171
task.getTitle(),
72-
task.getTaskStatus().getDescription(),
7372
task.getRequester().getNickname(),
7473
message,
7574
commenterName

0 commit comments

Comments
 (0)