From 865c15999e936da08feb4e686617f6004bb0e438 Mon Sep 17 00:00:00 2001 From: WangXu10 Date: Tue, 24 Sep 2024 17:02:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B):=20?= =?UTF-8?q?=E5=AF=BC=E5=87=BAxmind=E5=AD=97=E6=AE=B5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1045424 --user=王旭 【测试用例】用例导出为xmind-用例步骤无内容-导出勾选步骤描述和预期结果-导出后无该字段 https://www.tapd.cn/55049933/s/1584799 --- .../xmind/utils/XmindExportUtil.java | 21 ++++++------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/xmind/utils/XmindExportUtil.java b/backend/services/case-management/src/main/java/io/metersphere/functional/xmind/utils/XmindExportUtil.java index 4919b36725..aa5ca73be4 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/xmind/utils/XmindExportUtil.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/xmind/utils/XmindExportUtil.java @@ -541,25 +541,16 @@ public class XmindExportUtil { if (style != null) { stepTopic.setStyleId(style.getId()); } - - boolean hasResult = false; if (obj.containsKey("result")) { String result = obj.get("result"); - if (StringUtils.isNotEmpty(result)) { - hasResult = true; - ITopic resultTopic = workbook.createTopic(); - resultTopic.setTitleText(Translator.get("xmind_expectedResult").concat(":").concat(result)); - if (style != null) { - resultTopic.setStyleId(style.getId()); - } - stepTopic.add(resultTopic, ITopic.ATTACHED); + ITopic resultTopic = workbook.createTopic(); + resultTopic.setTitleText(Translator.get("xmind_expectedResult").concat(":").concat(result)); + if (style != null) { + resultTopic.setStyleId(style.getId()); } + stepTopic.add(resultTopic, ITopic.ATTACHED); } - - if (StringUtils.isNotEmpty(desc) || hasResult) { - stepDesTopic.add(stepTopic, ITopic.ATTACHED); - } - + stepDesTopic.add(stepTopic, ITopic.ATTACHED); } } if (CollectionUtils.isEmpty(arr)) {