fix(项目设置): 缺陷模板覆盖复制时不同类型字段处理问题

--bug=1018484 --user=宋昌昌 【项目设置】缺陷模版自定义字段类型同名不同类型,复制模版后目标项目字段未同步覆盖字段类型 https://www.tapd.cn/55049933/s/1274361
This commit is contained in:
song-cc-rock 2022-10-24 15:37:26 +08:00 committed by jianxing
parent 7f66632287
commit 9111e8a6ef
1 changed files with 3 additions and 4 deletions

View File

@ -391,11 +391,10 @@ public class IssueTemplateService extends TemplateBaseService {
tarCustomField.setCreateUser(SessionUtils.getUserId());
if (StringUtils.equals("1", request.getCopyModel())) {
// 覆盖模式
if (StringUtils.equals(sourceCustomField.getType(), tarCustomField.getType())) {
tarCustomField.setOptions(sourceCustomField.getOptions());
} else {
tarCustomField.setOptions("[]");
if (!StringUtils.equals(sourceCustomField.getType(), tarCustomField.getType())) {
tarCustomField.setType(sourceCustomField.getType());
}
tarCustomField.setOptions(sourceCustomField.getOptions());
customFieldMapper.updateByPrimaryKeyWithBLOBs(tarCustomField);
} else {
//追加模式