refactor(缺陷管理): 去掉自定义字段结尾的空格

--bug=1011993 --user=李玉号 [缺陷管理]github #12367
对接禅道企业版,缺陷模板中自定义字段的末尾如果有空隔,会导致此自定义字段无法传递给禅道
https://www.tapd.cn/55049933/s/1132501
This commit is contained in:
shiziyuan9527 2022-04-11 16:00:10 +08:00 committed by shiziyuan9527
parent 7997f1dcf6
commit a974dafb81
1 changed files with 5 additions and 1 deletions

View File

@ -399,7 +399,11 @@ public abstract class AbstractIssuePlatform implements IssuesPlatform {
List<CustomFieldItemDTO> customFields = CustomFieldService.getCustomFields(issuesRequest.getCustomFields());
customFields.forEach(item -> {
if (StringUtils.isNotBlank(item.getCustomData())) {
paramMap.add(item.getCustomData(), item.getValue());
if (item.getValue() instanceof String) {
paramMap.add(item.getCustomData(), ((String) item.getValue()).trim());
} else {
paramMap.add(item.getCustomData(), item.getValue());
}
}
});
}