From 7bdefc783aa64dbc2fc49ce486746ae613dc3584 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Tue, 20 Sep 2022 20:53:42 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20Ji?= =?UTF-8?q?ra=E6=B2=A1=E5=8B=BE=E9=80=89=E7=AC=AC=E4=B8=89=E6=96=B9?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=EF=BC=8C=E6=8F=90=E4=BA=A4=E7=BC=BA=E9=99=B7?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E4=B8=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1017001 --user=陈建星 【测试跟踪】缺陷管理-提交缺陷到jira平台-图片不显示 https://www.tapd.cn/55049933/s/1247880 --- .../java/io/metersphere/track/issue/JiraPlatform.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/backend/src/main/java/io/metersphere/track/issue/JiraPlatform.java b/backend/src/main/java/io/metersphere/track/issue/JiraPlatform.java index 0d3eec3f90..5095a01485 100644 --- a/backend/src/main/java/io/metersphere/track/issue/JiraPlatform.java +++ b/backend/src/main/java/io/metersphere/track/issue/JiraPlatform.java @@ -352,6 +352,8 @@ public class JiraPlatform extends AbstractIssuePlatform { } else { fields.put("summary", issuesRequest.getTitle()); fields.put("description", desc); + issuesRequest.getRequestFields().add(getRichTextCustomField("description")); + issuesRequest.getRequestFields().add(getRichTextCustomField("summary")); parseCustomFiled(issuesRequest, fields); } setSpecialParam(fields); @@ -359,6 +361,14 @@ public class JiraPlatform extends AbstractIssuePlatform { return addJiraIssueParam; } + private CustomFieldItemDTO getRichTextCustomField(String name) { + CustomFieldItemDTO customField = new CustomFieldItemDTO(); + customField.setId(name); + customField.setType(CustomFieldType.RICH_TEXT.getValue()); + customField.setCustomData(name); + return customField; + } + private String dealWithImage(String description) { String regex = "(\\!\\[.*?\\]\\((.*?)\\))"; Matcher matcher = Pattern.compile(regex).matcher(description);