fix(测试跟踪): 附件内容存在时新版本用例创建问题

--bug=1019020 --user=宋昌昌 【测试跟踪】功能用例-编辑用例-“其他信息”中只有附件有内容,添加新版本时未弹框提示是否勾选同步附件等内容 https://www.tapd.cn/55049933/s/1282187
This commit is contained in:
song-cc-rock 2022-10-28 15:41:11 +08:00 committed by 刘瑞斌
parent 502c1608db
commit 2d05fe71d7
1 changed files with 3 additions and 1 deletions

View File

@ -2984,10 +2984,12 @@ public class TestCaseService {
public Boolean hasOtherInfo(String caseId) {
TestCaseWithBLOBs tc = getTestCase(caseId);
AttachmentModuleRelationExample example = new AttachmentModuleRelationExample();
example.createCriteria().andRelationIdEqualTo(caseId).andRelationTypeEqualTo(AttachmentType.TEST_CASE.type());
if (tc != null) {
if (StringUtils.isNotBlank(tc.getRemark()) || StringUtils.isNotBlank(tc.getDemandId()) || CollectionUtils.isNotEmpty(getRelateTest(caseId))
|| CollectionUtils.isNotEmpty(issuesService.getIssues(caseId, IssueRefType.FUNCTIONAL.name())) || CollectionUtils.isNotEmpty(getRelationshipCase(caseId, "PRE")) || CollectionUtils.isNotEmpty(getRelationshipCase(caseId, "POST"))
|| CollectionUtils.isNotEmpty(attachmentService.getFileMetadataByCaseId(caseId))) {
|| CollectionUtils.isNotEmpty(attachmentModuleRelationMapper.selectByExample(example))) {
return true;
}
}