From 633c1e19878e2595d3a8812dd108398bd7e85590 Mon Sep 17 00:00:00 2001 From: parkjaehak Date: Thu, 13 Feb 2025 12:36:00 +0900 Subject: [PATCH 1/2] =?UTF-8?q?CLAP-418=20HotFix:=20=EC=9E=91=EC=97=85=20?= =?UTF-8?q?=EC=8A=B9=EC=9D=B8=EC=8B=9C=20=EC=9E=91=EC=97=85=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/clap/server/domain/model/task/Task.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/clap/server/domain/model/task/Task.java b/src/main/java/clap/server/domain/model/task/Task.java index 4e032ab3..60a76251 100644 --- a/src/main/java/clap/server/domain/model/task/Task.java +++ b/src/main/java/clap/server/domain/model/task/Task.java @@ -100,6 +100,7 @@ public void approveTask(Member reviewer, Member processor, LocalDateTime dueDate this.dueDate = dueDate; this.category = category; this.label = label; + this.taskCode = toTaskCodeWithApproval(category); this.taskStatus = TaskStatus.IN_PROGRESS; } @@ -107,6 +108,11 @@ private static String toTaskCode(Category category) { return category.getMainCategory().getCode() + category.getCode() + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyMMddHHmm")); } + private String toTaskCodeWithApproval(Category category) { + return category.getMainCategory().getCode() + category.getCode() + super.getCreatedAt().format(DateTimeFormatter.ofPattern("yyMMddHHmm")); + } + + public void updateProcessorOrder(long newProcessorOrder) { this.processorOrder = newProcessorOrder; } From a8fa56cbacd032bb5858e8eccbbe6b57fd65dace Mon Sep 17 00:00:00 2001 From: parkjaehak Date: Thu, 13 Feb 2025 12:50:33 +0900 Subject: [PATCH 2/2] =?UTF-8?q?CLAP-418=20HotFix:=20=EC=9E=91=EC=97=85=20m?= =?UTF-8?q?ock=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20createdAt=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/test/java/clap/server/TestDataFactory.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test/java/clap/server/TestDataFactory.java b/src/test/java/clap/server/TestDataFactory.java index 62ef0a47..e485bb7b 100644 --- a/src/test/java/clap/server/TestDataFactory.java +++ b/src/test/java/clap/server/TestDataFactory.java @@ -194,6 +194,7 @@ public static Task createTask(Long id, String taskCode, String title, TaskStatus .requester(createUser()) .processor(processor) .label(createLabel()) + .createdAt(LocalDateTime.now()) .build(); }