fix(用例管理): 修复用例详情变更历史为0问题

--bug=1036351 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001036351
This commit is contained in:
guoyuqi 2024-02-28 18:23:53 +08:00 committed by 刘瑞斌
parent 185848ef7d
commit 7692b0d9b1
2 changed files with 6 additions and 2 deletions

View File

@ -378,7 +378,9 @@ public class FunctionalCaseService {
//获取变更历史数量数量
OperationHistoryExample operationHistoryExample = new OperationHistoryExample();
operationHistoryExample.createCriteria().andSourceIdEqualTo(functionalCaseDetailDTO.getId());
List<String>types = List.of(OperationLogType.ADD.name(), OperationLogType.IMPORT.name(), OperationLogType.UPDATE.name());
List<String> 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));
}

View File

@ -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<string, any> = {
case: caseCount,
dependency: relateEdgeCount,
@ -357,6 +357,8 @@
testPlan: testPlanCount,
bug: bugCount,
requirement: demandCount,
comments: commentCount,
changeHistory: historyCount
};
featureCaseStore.initCountMap(countMap);
}