From 2d05fe71d744922963389e5a38a488aef619139f Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Fri, 28 Oct 2022 15:41:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E9=99=84=E4=BB=B6=E5=86=85=E5=AE=B9=E5=AD=98=E5=9C=A8=E6=97=B6?= =?UTF-8?q?=E6=96=B0=E7=89=88=E6=9C=AC=E7=94=A8=E4=BE=8B=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1019020 --user=宋昌昌 【测试跟踪】功能用例-编辑用例-“其他信息”中只有附件有内容,添加新版本时未弹框提示是否勾选同步附件等内容 https://www.tapd.cn/55049933/s/1282187 --- .../src/main/java/io/metersphere/service/TestCaseService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test-track/backend/src/main/java/io/metersphere/service/TestCaseService.java b/test-track/backend/src/main/java/io/metersphere/service/TestCaseService.java index 54ea9e5ac7..b1cf720e88 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/TestCaseService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/TestCaseService.java @@ -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; } }