From 86bed46177ccb693e2fb0549cb080b3462728efb Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Thu, 10 Oct 2024 16:03:41 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E7=94=A8=E4=BE=8B=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E5=AF=BC=E5=87=BA=E5=A2=9E=E5=8A=A0=E5=A4=87?= =?UTF-8?q?=E6=B3=A8=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../functional/excel/domain/FunctionalCaseExportColumns.java | 2 ++ .../functional/service/FunctionalCaseFileService.java | 4 +++- .../metersphere/functional/xmind/utils/XmindExportUtil.java | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/excel/domain/FunctionalCaseExportColumns.java b/backend/services/case-management/src/main/java/io/metersphere/functional/excel/domain/FunctionalCaseExportColumns.java index 317b0f9871..2891ee6a7c 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/excel/domain/FunctionalCaseExportColumns.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/excel/domain/FunctionalCaseExportColumns.java @@ -26,6 +26,8 @@ public class FunctionalCaseExportColumns { systemColumns.put("text_description", Translator.get("case.export.system.columns.text_description")); systemColumns.put("expected_result", Translator.get("case.export.system.columns.expected_result")); systemColumns.put("tags", Translator.get("xmind_tags")); + systemColumns.put("description", Translator.get("xmind_description")); + // 其他字段 otherColumns.put("last_execute_result", Translator.get("case.export.system.other.columns.last_execute_result")); diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseFileService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseFileService.java index 4320b57404..ecb13d0635 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseFileService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseFileService.java @@ -219,6 +219,7 @@ public class FunctionalCaseFileService { testCaseDTO.setName(Translator.get("test_case") + i); testCaseDTO.setModule(path.toString()); testCaseDTO.setPrerequisite(Translator.get("test_case_prerequisite")); + testCaseDTO.setDescription(Translator.get("test_case_remark")); testCaseDTO.setCaseEditType("STEP"); String textDescription = ""; String expectedResult = ""; @@ -653,7 +654,8 @@ public class FunctionalCaseFileService { //构建步骤 buildExportStep(data, functionalCaseBlob, functionalCase.getCaseEditType(), textDescriptionList, expectedResultList); data.setPrerequisite(parseHtml(new String(functionalCaseBlob.getPrerequisite() == null ? new byte[0] : functionalCaseBlob.getPrerequisite(), StandardCharsets.UTF_8))); - + //备注 + data.setDescription(parseHtml(new String(functionalCaseBlob.getDescription() == null ? new byte[0] : functionalCaseBlob.getDescription(), StandardCharsets.UTF_8))); //标签 data.setTags(JSON.toJSONString(functionalCase.getTags())); data.setCaseEditType(functionalCase.getCaseEditType()); 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 aa5ca73be4..3cf7561d82 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 @@ -444,6 +444,9 @@ public class XmindExportUtil { case "tags": preTopic.setTitleText(columns.getSystemColumns().get(item).concat(":").concat(parseTag(dto.getTags()))); break; + case "description": + preTopic.setTitleText(columns.getSystemColumns().get(item).concat(":").concat(dto.getDescription())); + break; default: break; }