mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-04 13:09:28 +08:00
fix(测试跟踪): 功能用例变更记录国际化
--bug=1028410 --user=王旭 【测试跟踪】github#26003,国际化问题 测试跟踪 功能用例导出、更改记录、编辑等 https://www.tapd.cn/55049933/s/1403980
This commit is contained in:
parent
7318be23cc
commit
4a71b5d3c4
@ -10,6 +10,7 @@ import io.metersphere.commons.utils.BeanUtils;
|
||||
import io.metersphere.commons.utils.JSON;
|
||||
import io.metersphere.i18n.Translator;
|
||||
import io.metersphere.log.constants.OperatorLevel;
|
||||
import io.metersphere.log.vo.DetailColumn;
|
||||
import io.metersphere.log.vo.OperatingLogDTO;
|
||||
import io.metersphere.log.vo.OperatingLogDetails;
|
||||
import io.metersphere.log.vo.OperatingLogRequest;
|
||||
@ -131,7 +132,15 @@ public class OperatingLogService {
|
||||
}
|
||||
if (CollectionUtils.isEmpty(logWithBLOB.getDetails().getColumns())) {
|
||||
dtos.add(logWithBLOB);
|
||||
}
|
||||
} else {
|
||||
List<DetailColumn> columns = logWithBLOB.getDetails().getColumns();
|
||||
columns.stream().forEach(column -> {
|
||||
if (StringUtils.isNotEmpty(column.getColumnTitle())) {
|
||||
String columnsTitle = Translator.get(column.getColumnTitle());
|
||||
column.setColumnTitle(columnsTitle.replace("Not Support Key:", ""));
|
||||
}
|
||||
});
|
||||
}
|
||||
setUserName(logWithBLOB);
|
||||
}
|
||||
}
|
||||
|
@ -8,28 +8,28 @@ public class TestCaseReference {
|
||||
|
||||
static {
|
||||
testCaseColumns.clear();
|
||||
testCaseColumns.put("name", "用例名称");
|
||||
testCaseColumns.put("createUser", "创建人");
|
||||
testCaseColumns.put("nodePath", "用例模块");
|
||||
testCaseColumns.put("type", "用例类型");
|
||||
testCaseColumns.put("maintainer", "责任人");
|
||||
testCaseColumns.put("priority", "用例等级");
|
||||
testCaseColumns.put("method", "请求类型");
|
||||
testCaseColumns.put("prerequisite", "前置条件");
|
||||
testCaseColumns.put("remark", "备注");
|
||||
testCaseColumns.put("name", "test_case_name");
|
||||
testCaseColumns.put("createUser", "create_user");
|
||||
testCaseColumns.put("nodePath", "module");
|
||||
testCaseColumns.put("type", "test_case_type");
|
||||
testCaseColumns.put("maintainer", "maintainer");
|
||||
testCaseColumns.put("priority", "test_case_priority");
|
||||
testCaseColumns.put("method", "method");
|
||||
testCaseColumns.put("prerequisite", "preconditions");
|
||||
testCaseColumns.put("remark", "remark");
|
||||
testCaseColumns.put("customNum", "ID");
|
||||
testCaseColumns.put("steps", "用例步骤");
|
||||
testCaseColumns.put("other_test_name", "其他名称");
|
||||
testCaseColumns.put("review_status", "评审状态");
|
||||
testCaseColumns.put("tags", "标签");
|
||||
testCaseColumns.put("demand_name", "需求名称");
|
||||
testCaseColumns.put("follow_people", "关注人");
|
||||
testCaseColumns.put("status", "用例状态");
|
||||
testCaseColumns.put("stepDescription", "步骤描述");
|
||||
testCaseColumns.put("expectedResult", "预期结果");
|
||||
testCaseColumns.put("demandName", "关联需求");
|
||||
testCaseColumns.put("followPeople", "关注人");
|
||||
testCaseColumns.put("comment", "评论");
|
||||
testCaseColumns.put("steps", "case_step");
|
||||
testCaseColumns.put("other_test_name", "other_test_name");
|
||||
testCaseColumns.put("review_status", "review_status");
|
||||
testCaseColumns.put("tags", "tag");
|
||||
testCaseColumns.put("demand_name", "demand_name");
|
||||
testCaseColumns.put("follow_people", "follow_people");
|
||||
testCaseColumns.put("status", "test_case_status");
|
||||
testCaseColumns.put("stepDescription", "test_case_step_desc");
|
||||
testCaseColumns.put("expectedResult", "test_case_step_result");
|
||||
testCaseColumns.put("demandName", "related_requirements");
|
||||
testCaseColumns.put("followPeople", "follow_people");
|
||||
testCaseColumns.put("comment", "comment");
|
||||
testCaseColumns.put("ms-dff-col", "tags,steps");
|
||||
|
||||
}
|
||||
|
@ -169,6 +169,21 @@ issue_project_not_exist=ID does not exist or other errors
|
||||
tapd_project_not_exist=The associated TAPD item ID does not exist
|
||||
zentao_get_project_builds_fail=Get Affecting Version Errors
|
||||
zentao_project_id_not_exist=The associated Zen Tao ID does not exist or other errors
|
||||
preconditions=Preconditions
|
||||
maintainer=Maintainer
|
||||
method=Method
|
||||
remark=Remark
|
||||
case_step=Case Step
|
||||
tag=Tag
|
||||
comment=Comment
|
||||
related_requirements=Related Requirements
|
||||
follow_people=Follow People
|
||||
demand_name=Demand Name
|
||||
review_status=Review Status
|
||||
other_test_name=Other Test Name
|
||||
related_test_case=Related Test Case
|
||||
related_issues=Related Issues
|
||||
attachment=Attachment
|
||||
#ldap
|
||||
ldap_url_is_null=LDAP address is empty
|
||||
ldap_dn_is_null=LDAP binding DN is empty
|
||||
|
@ -169,6 +169,21 @@ issue_project_not_exist=ID不存在或其它错误
|
||||
tapd_project_not_exist=关联的TAPD项目ID不存在
|
||||
zentao_get_project_builds_fail=获取影响版本错误
|
||||
zentao_project_id_not_exist=关联的禅道ID不存在或其它错误
|
||||
preconditions=前置条件
|
||||
maintainer=责任人
|
||||
method=请求类型
|
||||
remark=备注
|
||||
case_step=用例步骤
|
||||
tag=标签
|
||||
comment=评论
|
||||
related_requirements=关联需求
|
||||
follow_people=关注人
|
||||
demand_name=需求名称
|
||||
review_status=评审状态
|
||||
other_test_name=其它名称
|
||||
related_test_case=关联用例
|
||||
related_issues=关联缺陷
|
||||
attachment=附件
|
||||
#ldap
|
||||
ldap_url_is_null=LDAP地址为空
|
||||
ldap_dn_is_null=LDAP绑定DN为空
|
||||
|
@ -169,6 +169,21 @@ issue_project_not_exist=ID不存在或其它錯誤
|
||||
tapd_project_not_exist=關聯的TAPD項目ID不存在
|
||||
zentao_get_project_builds_fail=獲取影響版本錯誤
|
||||
zentao_project_id_not_exist=關聯的禪道ID不存在或其它錯誤
|
||||
preconditions=前置條件
|
||||
maintainer=責任人
|
||||
method=請求類型
|
||||
remark=備註
|
||||
case_step=用例步驟
|
||||
tag=標簽
|
||||
comment=評論
|
||||
related_requirements=關聯需求
|
||||
follow_people=關注人
|
||||
demand_name=需求名稱
|
||||
review_status=評審狀態
|
||||
other_test_name=其它名稱
|
||||
related_test_case=關聯用例
|
||||
related_issues=關聯缺陷
|
||||
attachment=附件
|
||||
#ldap
|
||||
ldap_url_is_null=LDAP地址為空
|
||||
ldap_dn_is_null=LDAP綁定DN為空
|
||||
|
@ -2614,7 +2614,7 @@ public class TestCaseService {
|
||||
}
|
||||
}
|
||||
}
|
||||
DetailColumn column = new DetailColumn("关联测试", "testcase", nameBuilder.toString(), null);
|
||||
DetailColumn column = new DetailColumn("related_test_case", "testcase", nameBuilder.toString(), null);
|
||||
columns.add(column);
|
||||
|
||||
//关联缺陷
|
||||
@ -2631,7 +2631,7 @@ public class TestCaseService {
|
||||
issuesNames = issues.stream().map(Issues::getTitle).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
DetailColumn issuesColumn = new DetailColumn("关联缺陷 ", "issues", String.join(",", issuesNames), null);
|
||||
DetailColumn issuesColumn = new DetailColumn("related_issues ", "issues", String.join(",", issuesNames), null);
|
||||
columns.add(issuesColumn);
|
||||
//附件
|
||||
List<FileMetadata> originFiles = attachmentService.getFileMetadataByCaseId(id);
|
||||
@ -2639,7 +2639,7 @@ public class TestCaseService {
|
||||
if (CollectionUtils.isNotEmpty(originFiles)) {
|
||||
fileNames = originFiles.stream().map(FileMetadata::getName).collect(Collectors.toList());
|
||||
}
|
||||
DetailColumn fileColumn = new DetailColumn("附件 ", "files", String.join(",", fileNames), null);
|
||||
DetailColumn fileColumn = new DetailColumn("attachment", "files", String.join(",", fileNames), null);
|
||||
columns.add(fileColumn);
|
||||
|
||||
// 增加评论内容
|
||||
@ -2648,7 +2648,7 @@ public class TestCaseService {
|
||||
if (CollectionUtils.isNotEmpty(dtos)) {
|
||||
names = dtos.stream().map(TestCaseCommentDTO::getDescription).collect(Collectors.toList());
|
||||
}
|
||||
DetailColumn detailColumn = new DetailColumn("评论", "comment", String.join(StringUtils.LF, names), null);
|
||||
DetailColumn detailColumn = new DetailColumn("comment", "comment", String.join(StringUtils.LF, names), null);
|
||||
columns.add(detailColumn);
|
||||
|
||||
OperatingLogDetails details = new OperatingLogDetails(JSON.toJSONString(id), bloBs.getProjectId(), bloBs.getName(), bloBs.getCreateUser(), columns);
|
||||
|
Loading…
Reference in New Issue
Block a user