diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseService.java index 4867715d7c..5910320d24 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseService.java @@ -390,6 +390,11 @@ public class FunctionalCaseService { BugRelationCaseExample bugRelationCaseExample = new BugRelationCaseExample(); bugRelationCaseExample.createCriteria().andCaseIdEqualTo(functionalCaseDetailDTO.getId()); functionalCaseDetailDTO.setBugCount((int) bugRelationCaseMapper.countByExample(bugRelationCaseExample)); + //获取在测试计划中关联缺陷的数量 + bugRelationCaseExample = new BugRelationCaseExample(); + bugRelationCaseExample.createCriteria().andTestPlanCaseIdEqualTo(functionalCaseDetailDTO.getId()); + long planBugCount = bugRelationCaseMapper.countByExample(bugRelationCaseExample); + functionalCaseDetailDTO.setBugCount(functionalCaseDetailDTO.getBugCount() + (int) planBugCount); //获取已关联依赖关系数量 FunctionalCaseRelationshipEdgeExample relationshipEdgeExample = new FunctionalCaseRelationshipEdgeExample(); relationshipEdgeExample.createCriteria() 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 e20daa0f86..47d20943c8 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 @@ -562,7 +562,7 @@ // 去测试计划页面 function goToPlan(record: BugListItem) { router.push({ - name: TestPlanRouteEnum.TEST_PLAN_INDEX, + name: TestPlanRouteEnum.TEST_PLAN_INDEX_DETAIL, query: { ...route.query, id: record.testPlanId, diff --git a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabTestPlan.vue b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabTestPlan.vue index 363cd36ba0..a5266a633f 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabTestPlan.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabTestPlan.vue @@ -249,7 +249,7 @@ // 去测试计划页面 function goToPlan(record: AssociateFunctionalCaseItem) { router.push({ - name: TestPlanRouteEnum.TEST_PLAN_INDEX, + name: TestPlanRouteEnum.TEST_PLAN_INDEX_DETAIL, query: { ...route.query, id: record.testPlanId,