From 7692b0d9b15e62a5798df3342c6e22c12f407df1 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Wed, 28 Feb 2024 18:23:53 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=94=A8=E4=BE=8B=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=94=A8=E4=BE=8B=E8=AF=A6=E6=83=85=E5=8F=98?= =?UTF-8?q?=E6=9B=B4=E5=8E=86=E5=8F=B2=E4=B8=BA0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1036351 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001036351 --- .../metersphere/functional/service/FunctionalCaseService.java | 4 +++- .../caseManagementFeature/components/caseDetailDrawer.vue | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) 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 43358d8ebb..74220d5840 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 @@ -378,7 +378,9 @@ public class FunctionalCaseService { //获取变更历史数量数量 OperationHistoryExample operationHistoryExample = new OperationHistoryExample(); - operationHistoryExample.createCriteria().andSourceIdEqualTo(functionalCaseDetailDTO.getId()); + Listtypes = List.of(OperationLogType.ADD.name(), OperationLogType.IMPORT.name(), OperationLogType.UPDATE.name()); + List modules = List.of(OperationLogModule.CASE_MANAGEMENT_CASE_CREATE, OperationLogModule.CASE_MANAGEMENT_CASE_UPDATE); + operationHistoryExample.createCriteria().andSourceIdEqualTo(functionalCaseDetailDTO.getId()).andTypeIn(types).andModuleIn(modules); functionalCaseDetailDTO.setHistoryCount((int) operationHistoryMapper.countByExample(operationHistoryExample)); } diff --git a/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue b/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue index e68cc608d9..596aae70de 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue @@ -349,7 +349,7 @@ // 初始化count function setCount(detail: DetailCase) { - const { bugCount, caseCount, caseReviewCount, demandCount, relateEdgeCount, testPlanCount } = detail; + const { bugCount, caseCount, caseReviewCount, demandCount, relateEdgeCount, testPlanCount, commentCount, historyCount } = detail; const countMap: Record = { case: caseCount, dependency: relateEdgeCount, @@ -357,6 +357,8 @@ testPlan: testPlanCount, bug: bugCount, requirement: demandCount, + comments: commentCount, + changeHistory: historyCount }; featureCaseStore.initCountMap(countMap); }