From 656036fa7987720fd41463df7b793661b0f7f922 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Wed, 18 Dec 2024 17:08:54 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=B7=A5=E4=BD=9C=E5=8F=B0):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E8=8E=B7=E5=8F=96=E6=9C=89=E6=9D=83=E9=99=90=E7=9A=84?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=A4=B1=E8=B4=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1050600 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001050600 --- .../java/io/metersphere/dashboard/service/DashboardService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/services/dashboard/src/main/java/io/metersphere/dashboard/service/DashboardService.java b/backend/services/dashboard/src/main/java/io/metersphere/dashboard/service/DashboardService.java index b59d944bc1..3a243f09b7 100644 --- a/backend/services/dashboard/src/main/java/io/metersphere/dashboard/service/DashboardService.java +++ b/backend/services/dashboard/src/main/java/io/metersphere/dashboard/service/DashboardService.java @@ -512,7 +512,7 @@ public class DashboardService { private void setPlanId(LayoutDTO layoutDTO) { TestPlan testPlan = testPlanMapper.selectByPrimaryKey(layoutDTO.getPlanId()); - if (testPlan == null || StringUtils.equalsIgnoreCase(testPlan.getStatus(), TestPlanConstants.TEST_PLAN_STATUS_ARCHIVED)) { + if (testPlan == null || StringUtils.equalsIgnoreCase(testPlan.getStatus(), TestPlanConstants.TEST_PLAN_STATUS_ARCHIVED) || !StringUtils.equalsIgnoreCase(testPlan.getProjectId(),layoutDTO.getProjectIds().getFirst())) { TestPlan latestPlan = extTestPlanMapper.getLatestPlan(layoutDTO.getProjectIds().getFirst()); if (latestPlan != null) { layoutDTO.setPlanId(latestPlan.getId());