From 0626f5c048f5e2dc6aa01c817e048037ce6d4df1 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Thu, 9 May 2024 19:27:12 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E7=94=A8=E4=BE=8B=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E8=AF=A6=E6=83=85=E5=85=B3=E8=81=94=E7=BC=BA?= =?UTF-8?q?=E9=99=B7=E6=94=BE=E5=BC=80=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../request/AssociateBugPageRequest.java | 4 +- .../bug/mapper/ExtBugRelateCaseMapper.xml | 3 + frontend/src/models/bug-management.ts | 1 + .../tabContent/tabBug/tabDefect.vue | 58 ++++++++++++++----- 4 files changed, 52 insertions(+), 14 deletions(-) diff --git a/backend/framework/provider/src/main/java/io/metersphere/request/AssociateBugPageRequest.java b/backend/framework/provider/src/main/java/io/metersphere/request/AssociateBugPageRequest.java index 90453f8b47..54d3b7075d 100644 --- a/backend/framework/provider/src/main/java/io/metersphere/request/AssociateBugPageRequest.java +++ b/backend/framework/provider/src/main/java/io/metersphere/request/AssociateBugPageRequest.java @@ -21,9 +21,11 @@ import java.util.Map; public class AssociateBugPageRequest extends BaseProviderCondition { @Schema(description = "用例id", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{functional_case.id.not_blank}") private String caseId; + @Schema(description = "关联测试计划用例ID", requiredMode = Schema.RequiredMode.REQUIRED) + private String testPlanCaseId; + @Schema(description = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{functional_case.project_id.not_blank}") private String projectId; diff --git a/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugRelateCaseMapper.xml b/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugRelateCaseMapper.xml index 685c366133..4b6ee25a4c 100644 --- a/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugRelateCaseMapper.xml +++ b/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugRelateCaseMapper.xml @@ -136,6 +136,9 @@ and brc.case_id = #{request.caseId} + + and brc.test_plan_case_id = #{request.testPlanCaseId} + and b.title like concat('%', #{request.keyword},'%') diff --git a/frontend/src/models/bug-management.ts b/frontend/src/models/bug-management.ts index 42fb880970..8c6d8d84c2 100644 --- a/frontend/src/models/bug-management.ts +++ b/frontend/src/models/bug-management.ts @@ -17,6 +17,7 @@ export interface BugListItem { createTime: string; // 创建时间 updateTime: string; // 更新时间 deleted: boolean; // 删除标志 + testPlanId: string; // 测试计划ID } export interface BugOptionItem { diff --git a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/tabDefect.vue b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/tabDefect.vue index d853e2c92a..639b2894aa 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/tabDefect.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/tabDefect.vue @@ -36,14 +36,14 @@ t('caseManagement.featureCase.testPlanLinkList') }}
- + +