From acdab78fc1182859783ec21ca1262cc4d610c575 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Tue, 25 Oct 2022 10:09:34 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E6=8A=A5=E5=91=8A=E7=BC=BA?= =?UTF-8?q?=E9=99=B7=E5=88=97=E8=A1=A8=E5=8A=A0=E8=BD=BD=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1018798 --user=陈建星 【测试跟踪】测试计划-查看测试报告-功能用例分析-缺陷列表打不开,报500 https://www.tapd.cn/55049933/s/1275756 --- .../main/java/io/metersphere/service/IssuesService.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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)) {