diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/service/CustomFunctionLogService.java b/backend/services/project-management/src/main/java/io/metersphere/project/service/CustomFunctionLogService.java index 7245633c12..d58de6d916 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/service/CustomFunctionLogService.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/service/CustomFunctionLogService.java @@ -42,7 +42,7 @@ public class CustomFunctionLogService { null, null, OperationLogType.ADD.name(), - OperationLogModule.PROJECT_CUSTOM_FUNCTION, + OperationLogModule.PROJECT_MANAGEMENT_COMMON_SCRIPT, request.getName()); dto.setHistory(true); dto.setPath("/project/custom/func/add"); @@ -66,7 +66,7 @@ public class CustomFunctionLogService { request.getId(), null, OperationLogType.UPDATE.name(), - OperationLogModule.PROJECT_CUSTOM_FUNCTION, + OperationLogModule.PROJECT_MANAGEMENT_COMMON_SCRIPT, request.getName()); dto.setHistory(true); dto.setPath("/project/custom/func/update"); @@ -86,7 +86,7 @@ public class CustomFunctionLogService { customFunctionDTO.getId(), null, OperationLogType.UPDATE.name(), - OperationLogModule.PROJECT_CUSTOM_FUNCTION, + OperationLogModule.PROJECT_MANAGEMENT_COMMON_SCRIPT, customFunctionDTO.getName()); dto.setHistory(true); dto.setPath("/project/custom/func/status" ); @@ -112,7 +112,7 @@ public class CustomFunctionLogService { customFunctionDTO.getId(), null, OperationLogType.DELETE.name(), - OperationLogModule.PROJECT_CUSTOM_FUNCTION, + OperationLogModule.PROJECT_MANAGEMENT_COMMON_SCRIPT, customFunctionDTO.getName()); dto.setHistory(true); dto.setPath("/project/custom/func/delete"); diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/service/CustomFunctionService.java b/backend/services/project-management/src/main/java/io/metersphere/project/service/CustomFunctionService.java index 2ac5f16cbe..da770836a7 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/service/CustomFunctionService.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/service/CustomFunctionService.java @@ -174,7 +174,7 @@ public class CustomFunctionService { */ public List list(OperationHistoryRequest request) { OperationHistoryExample example = new OperationHistoryExample(); - example.createCriteria().andProjectIdEqualTo(request.getProjectId()).andModuleIn(List.of(OperationLogModule.PROJECT_CUSTOM_FUNCTION)) + example.createCriteria().andProjectIdEqualTo(request.getProjectId()).andModuleIn(List.of(OperationLogModule.PROJECT_MANAGEMENT_COMMON_SCRIPT)) .andSourceIdEqualTo(request.getSourceId()); List history = operationHistoryMapper.selectByExample(example); if (org.apache.commons.collections4.CollectionUtils.isEmpty(history)) { diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/log/constants/OperationLogModule.java b/backend/services/system-setting/src/main/java/io/metersphere/system/log/constants/OperationLogModule.java index 4c6c99d0b0..6103fba058 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/log/constants/OperationLogModule.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/log/constants/OperationLogModule.java @@ -127,7 +127,7 @@ public class OperationLogModule { public static final String PROJECT_MANAGEMENT_TEMPLATE_BUG_FIELD = "PROJECT_MANAGEMENT_TEMPLATE_API_FIELD"; public static final String PROJECT_MANAGEMENT_TEMPLATE_TEST_PLAN_FIELD = "PROJECT_MANAGEMENT_TEMPLATE_API_FIELD"; - public static final String PROJECT_CUSTOM_FUNCTION = "PROJECT_CUSTOM_FUNCTION";// 项目公共脚本 + public static final String PROJECT_MANAGEMENT_COMMON_SCRIPT = "PROJECT_MANAGEMENT_COMMON_SCRIPT";// 项目公共脚本 //用例 public static final String FUNCTIONAL_CASE = "CASE_MANAGEMENT_CASE"; diff --git a/frontend/src/config/pathMap.ts b/frontend/src/config/pathMap.ts index 11151dadaa..cf3c47658f 100644 --- a/frontend/src/config/pathMap.ts +++ b/frontend/src/config/pathMap.ts @@ -718,7 +718,7 @@ export const pathMap: PathMapItem[] = [ level: MENU_LEVEL[2], }, { - key: ' PROJECT_CUSTOM_FUNCTION', // 项目管理-公共脚本 + key: 'PROJECT_MANAGEMENT_COMMON_SCRIPT', // 项目管理-公共脚本 locale: 'menu.projectManagement.commonScript', route: RouteEnum.PROJECT_MANAGEMENT_COMMON_SCRIPT, permission: [],