From 1afb421f05980ddfbacae9ee0c77613bd0a9ca69 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Thu, 24 Oct 2024 15:31:59 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B6=88=E6=81=AF=E9=80=9A=E7=9F=A5):=20?= =?UTF-8?q?=E7=BC=BA=E9=99=B7=E9=80=9A=E7=9F=A5=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E8=8E=B7=E5=8F=96=E4=B8=8D=E5=88=B0=E5=AE=9E?= =?UTF-8?q?=E9=99=85=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1047046 --user=宋昌昌 【消息通知】缺陷管理的消息通知中自定义字段获取不到实际值 https://www.tapd.cn/55049933/s/1597207 --- .../io/metersphere/bug/dto/response/BugCustomFieldDTO.java | 3 +++ .../main/java/io/metersphere/bug/service/BugNoticeService.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/services/bug-management/src/main/java/io/metersphere/bug/dto/response/BugCustomFieldDTO.java b/backend/services/bug-management/src/main/java/io/metersphere/bug/dto/response/BugCustomFieldDTO.java index 4e4edc1259..6cae405640 100644 --- a/backend/services/bug-management/src/main/java/io/metersphere/bug/dto/response/BugCustomFieldDTO.java +++ b/backend/services/bug-management/src/main/java/io/metersphere/bug/dto/response/BugCustomFieldDTO.java @@ -14,4 +14,7 @@ public class BugCustomFieldDTO extends CustomField { @Schema(description = "缺陷ID") private String bugId; + + @Schema(description = "字段文本") + private String text; } diff --git a/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugNoticeService.java b/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugNoticeService.java index 82962a8d51..9f13ca7911 100644 --- a/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugNoticeService.java +++ b/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugNoticeService.java @@ -66,7 +66,7 @@ public class BugNoticeService { // 其他自定义字段 OptionDTO fieldDTO = new OptionDTO(); fieldDTO.setId(field.getName()); - fieldDTO.setName(field.getValue()); + fieldDTO.setName(StringUtils.isEmpty(field.getText()) ? field.getValue() : field.getText()); fields.add(fieldDTO); } });