fix(模板管理): 自定义字段用例模板和缺陷模板同样的名称不能共存

--bug=1007129 --user=lyh 【github#6720】模板管理里的自定义字段用例模板和缺陷模板同样的名称不能共存
https://www.tapd.cn/55049933/s/1057921
This commit is contained in:
shiziyuan9527 2021-10-22 17:53:38 +08:00 committed by shiziyuan9527
parent a7e6aa4c9d
commit 2404e2c4a5
1 changed files with 1 additions and 0 deletions

View File

@ -190,6 +190,7 @@ public class CustomFieldService {
CustomFieldExample.Criteria criteria = example.createCriteria();
criteria.andNameEqualTo(customField.getName());
criteria.andWorkspaceIdEqualTo(customField.getWorkspaceId());
criteria.andSceneEqualTo(customField.getScene());
if (StringUtils.isNotBlank(customField.getId())) {
criteria.andIdNotEqualTo(customField.getId());
}