refactor(测试计划): 测试计划用例列表缺陷新增逻辑

This commit is contained in:
song-cc-rock 2024-08-29 10:53:58 +08:00 committed by Craftsman
parent c1fd9f7731
commit 638e4ec6df
2 changed files with 7 additions and 4 deletions

View File

@ -55,13 +55,16 @@ public class BugEditRequest implements Serializable {
@Schema(description = "关联附件集合, 文件ID")
private List<String> linkFileIds;
@Schema(description = "用例ID")
@Schema(description = "用例ID, 创建缺陷并关联时必填")
private String caseId;
@Schema(description = "用例类型, 创建缺陷并关联时必填", allowableValues = {"FUNCTIONAL", "API", "SCENARIO"})
private String caseType;
@Schema(description = "测试计划ID,通过测试计划创建的必填")
private String testPlanId;
@Schema(description = "测试计划关联的用例ID, 通过测试计划创建的必填,值是关联的id而不是用例id")
@Schema(description = "测试计划关联的用例ID, 通过测试计划创建的必填,值是关联的关系ID而不是用例ID")
private String testPlanCaseId;
@Schema(description = "复制的附件")

View File

@ -1381,7 +1381,7 @@ public class BugService {
}
/**
* 处理并保存缺陷用例关联关系
* 处理并保存缺陷用例关联关系 (单条用例, 多条关联新增缺陷跳过)
*
* @param request 请求参数
* @param isUpdate 是否更新
@ -1395,7 +1395,7 @@ public class BugService {
bugRelationCase.setId(IDGenerator.nextStr());
bugRelationCase.setCaseId(request.getCaseId());
bugRelationCase.setBugId(bug.getId());
bugRelationCase.setCaseType(CaseType.FUNCTIONAL_CASE.getKey());
bugRelationCase.setCaseType(request.getCaseType());
bugRelationCase.setCreateUser(currentUser);
bugRelationCase.setCreateTime(System.currentTimeMillis());
bugRelationCase.setUpdateTime(System.currentTimeMillis());