diff --git a/test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java b/test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java index 2bec9b95d0..aa3ac12a78 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java +++ b/test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java @@ -384,15 +384,17 @@ public abstract class AbstractIssuePlatform implements IssuesPlatform { protected void addCustomFields(IssuesUpdateRequest issuesRequest, MultiValueMap paramMap) { List customFields = issuesRequest.getRequestFields(); - customFields.forEach(item -> { - if (StringUtils.isNotBlank(item.getCustomData())) { - if (item.getValue() instanceof String) { - paramMap.add(item.getCustomData(), ((String) item.getValue()).trim()); - } else { - paramMap.add(item.getCustomData(), item.getValue()); + if (!CollectionUtils.isEmpty(customFields)) { + customFields.forEach(item -> { + if (StringUtils.isNotBlank(item.getCustomData())) { + if (item.getValue() instanceof String) { + paramMap.add(item.getCustomData(), ((String) item.getValue()).trim()); + } else { + paramMap.add(item.getCustomData(), item.getValue()); + } } - } - }); + }); + } } protected Object getSyncJsonParamValue(Object value) {