fix(测试跟踪): 测试计划功能用例创建缺陷失败
--bug=1026371 --user=陈建星 【测试跟踪】项目集成local-测试计划-功能用例-关联缺陷-添加缺陷-添加失败 https://www.tapd.cn/55049933/s/1373475
This commit is contained in:
parent
73c57c77af
commit
6690ea2127
|
@ -1992,7 +1992,7 @@ public class IssuesService {
|
|||
return tapdUsers;
|
||||
}
|
||||
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE, type = OperLogConstants.ASSOCIATE_ISSUE, content = "#msClass.getIssueLogDetails(#caseId, #issuesId)", msClass = TestCaseIssueService.class)
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_CASE, type = OperLogConstants.ASSOCIATE_ISSUE, content = "#msClass.getIssueLogDetails(#caseId, #refId, #issuesId)", msClass = TestCaseIssueService.class)
|
||||
public void insertIssueRelateLog(String issuesId, String caseId, String refId, String refType) {
|
||||
testCaseIssueService.add(issuesId, caseId, refId, refType);
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import io.metersphere.base.mapper.TestPlanTestCaseMapper;
|
|||
import io.metersphere.commons.constants.IssueRefType;
|
||||
import io.metersphere.commons.utils.JSON;
|
||||
import io.metersphere.dto.TestCaseDTO;
|
||||
import io.metersphere.i18n.Translator;
|
||||
import io.metersphere.log.vo.OperatingLogDetails;
|
||||
import io.metersphere.request.issues.IssuesRelevanceRequest;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
@ -149,4 +150,20 @@ public class TestCaseIssueService {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getIssueLogDetails(String caseResourceId, String refId, String issuesId) {
|
||||
TestCaseWithBLOBs issue = null;
|
||||
if (StringUtils.isNotBlank(refId)) {
|
||||
issue = testCaseService.getTestCase(refId);
|
||||
}
|
||||
if (issue == null) {
|
||||
issue = testCaseService.getTestCase(caseResourceId);
|
||||
}
|
||||
if (issue != null) {
|
||||
IssuesWithBLOBs issuesWithBLOBs = issuesMapper.selectByPrimaryKey(issuesId);
|
||||
OperatingLogDetails details = new OperatingLogDetails(JSON.toJSONString(issuesId), issue.getProjectId(), issue.getName() + Translator.get("relate_resource") + issuesWithBLOBs.getTitle(), issue.getCreateUser(), new LinkedList<>());
|
||||
return JSON.toJSONString(details);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -236,3 +236,4 @@ parallel=Parallel
|
|||
rerun_warning=The report is being rerun, check it later
|
||||
case_export_text_validate_tip=Use case %s contains extremely long text, currently supported up to %s!
|
||||
case_import_table_header_missing=Header information is missing!
|
||||
relate_resource=relate
|
||||
|
|
|
@ -207,3 +207,4 @@ parallel=并行
|
|||
rerun_warning=报告正在重跑中,稍后查看
|
||||
case_export_text_validate_tip=用例 %s 包含超长文本,目前支持最大长度为 %s !
|
||||
case_import_table_header_not_exist=缺少表头信息!
|
||||
relate_resource=关联
|
||||
|
|
|
@ -207,3 +207,4 @@ parallel=並行
|
|||
rerun_warning=報告正在重跑中,稻後查看
|
||||
case_export_text_validate_tip=用例 %s 包含超長文本,目前支持最大長度為 %s !
|
||||
case_import_table_header_not_exist=缺少表頭信息!
|
||||
relate_resource=關聯
|
||||
|
|
Loading…
Reference in New Issue