From fd62f7d39ad1096f82f3ba488d7ba362a0373fcc Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Tue, 20 Sep 2022 13:53:59 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B=E5=BA=93=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/metersphere/track/service/TestCaseService.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java index fa5ae8a881..739c7d8d0b 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java @@ -832,8 +832,10 @@ public class TestCaseService { }); returnList.forEach(testCase -> { - String status = projectStatusOptionMap.get(testCase.getProjectId()).get(testCase.getStatus()); - String priority = projectPriorityOptionMap.get(testCase.getProjectId()).get(testCase.getStatus()); + Map statusMap = projectStatusOptionMap.get(testCase.getProjectId()); + Map priorityMap = projectPriorityOptionMap.get(testCase.getProjectId()); + String status = statusMap == null ? testCase.getStatus() : statusMap.get(testCase.getStatus()); + String priority = priorityMap == null ? testCase.getPriority() : priorityMap.get(testCase.getPriority()); if (StringUtils.isNotBlank(status)) { testCase.setStatus(status); }