diff --git a/test-track/backend/src/main/java/io/metersphere/service/IssuesService.java b/test-track/backend/src/main/java/io/metersphere/service/IssuesService.java index ef190b07de..7a339f7d13 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/IssuesService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/IssuesService.java @@ -854,6 +854,11 @@ public class IssuesService { return DistinctKeyUtil.distinctByKey(planIssues, IssuesDao::getId); } + /** + * 获取缺陷状态的自定义字段替换 + * @param planIssues + * @param planId + */ private void replaceStatus(List planIssues, String planId) { TestPlanWithBLOBs testPlan = testPlanService.get(planId); CustomField customField = baseCustomFieldService.getCustomFieldByName(testPlan.getProjectId(), SystemCustomField.ISSUE_STATUS); @@ -865,7 +870,7 @@ public class IssuesService { List options = JSON.parseArray(customField.getOptions(), CustomFieldOptionDTO.class); for (CustomFieldOptionDTO option : options) { String value = field.getValue(); - if (value != null) { + if (StringUtils.isNotBlank(value)) { value = (String) JSON.parseObject(value); } if (StringUtils.equals(option.getValue(), value)) {