fix(用例管理): 修复用例详情变更历史为0问题
--bug=1036351 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001036351
This commit is contained in:
parent
185848ef7d
commit
7692b0d9b1
|
@ -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));
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue