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') }}
- + +