fix(用例管理): 修复查询用例等级失败问题

--bug=1045203 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001045203
This commit is contained in:
guoyuqi 2024-08-16 18:39:33 +08:00 committed by 刘瑞斌
parent 4d8378c10e
commit cd3526d0e8
3 changed files with 9 additions and 2 deletions

View File

@ -38,4 +38,7 @@ public class FunctionalCaseCustomFieldDTO implements Serializable {
@Schema(title = "字段类型") @Schema(title = "字段类型")
private String type; private String type;
@Schema(title = "字段key名")
private String internalFieldKey;
} }

View File

@ -414,6 +414,10 @@ public class FunctionalCaseImportEventListener extends AnalysisEventListener<Map
* @param errMsg * @param errMsg
*/ */
private void validateTags(FunctionalCaseExcelData data, StringBuilder errMsg) { private void validateTags(FunctionalCaseExcelData data, StringBuilder errMsg) {
if (StringUtils.isBlank(data.getTags())) {
data.setTags(StringUtils.EMPTY);
return;
}
List<String> tags = functionalCaseService.handleImportTags(data.getTags()); List<String> tags = functionalCaseService.handleImportTags(data.getTags());
if (tags.size() > TAGS_COUNT) { if (tags.size() > TAGS_COUNT) {
errMsg.append(Translator.get("tags_count")) errMsg.append(Translator.get("tags_count"))
@ -425,7 +429,6 @@ public class FunctionalCaseImportEventListener extends AnalysisEventListener<Map
errMsg.append(Translator.get("tag_length")) errMsg.append(Translator.get("tag_length"))
.append(ERROR_MSG_SEPARATOR); .append(ERROR_MSG_SEPARATOR);
} }
return;
}); });
} }

View File

@ -26,7 +26,8 @@
fccf.`value` defaultValue, fccf.`value` defaultValue,
cf.NAME fieldName, cf.NAME fieldName,
cf.internal internal, cf.internal internal,
cf.type type cf.type type,
cf.NAME internalFieldKey
FROM FROM
functional_case_custom_field fccf functional_case_custom_field fccf
INNER JOIN custom_field cf ON fccf.field_id = cf.id INNER JOIN custom_field cf ON fccf.field_id = cf.id