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); } });