From dc96a9affaba9f66e16d195902c11bfc201d4467 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Mon, 25 Jan 2021 16:50:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E4=B8=8D=E5=87=86=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/track/service/TestPlanService.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java index 124dfccddd..0bede56d14 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java @@ -104,6 +104,8 @@ public class TestPlanService { private ExtTestPlanApiCaseMapper extTestPlanApiCaseMapper; @Resource private ExtTestPlanLoadCaseMapper extTestPlanLoadCaseMapper; + @Resource + private ExtTestPlanScenarioCaseMapper extTestPlanScenarioCaseMapper; public synchronized void addTestPlan(AddTestPlanRequest testPlan) { if (getTestPlanByName(testPlan.getName()).size() > 0) { @@ -602,6 +604,14 @@ public class TestPlanService { } } + // test-plan-scenario-case status + List scenarioStatusList = extTestPlanScenarioCaseMapper.getExecResultByPlanId(planId); + for (String scenarioStatus : scenarioStatusList) { + if (scenarioStatus == null) { + return TestPlanStatus.Underway.name(); + } + } + // test-plan-load-case status List loadStatusList = extTestPlanLoadCaseMapper.getStatusByTestPlanId(planId); for (String loadStatus : loadStatusList) {