fix(项目管理): 优化缺陷模板类型命名

This commit is contained in:
AgAngle 2023-10-11 16:39:56 +08:00 committed by 刘瑞斌
parent 887cc6fcb3
commit 51ff627911
7 changed files with 6 additions and 8 deletions

View File

@ -39,7 +39,7 @@ public class ProjectCustomFieldController {
@RequiresPermissions(PermissionConstants.PROJECT_CUSTOM_FIELD_READ) @RequiresPermissions(PermissionConstants.PROJECT_CUSTOM_FIELD_READ)
public List<CustomField> list(@Schema(description = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED) public List<CustomField> list(@Schema(description = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED)
@PathVariable String projectId, @PathVariable String projectId,
@Schema(description = "模板的使用场景FUNCTIONAL,ISSUE,API,UI", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "模板的使用场景FUNCTIONAL,BUG,API,UI", requiredMode = Schema.RequiredMode.REQUIRED)
@PathVariable String scene) { @PathVariable String scene) {
return projectCustomFieldService.list(projectId, scene); return projectCustomFieldService.list(projectId, scene);
} }

View File

@ -39,7 +39,7 @@ public class ProjectTemplateController {
@RequiresPermissions(PermissionConstants.PROJECT_TEMPLATE_READ) @RequiresPermissions(PermissionConstants.PROJECT_TEMPLATE_READ)
public List<Template> list(@Schema(description = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED) public List<Template> list(@Schema(description = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED)
@PathVariable String projectId, @PathVariable String projectId,
@Schema(description = "模板的使用场景FUNCTIONAL,ISSUE,API,UI", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "模板的使用场景FUNCTIONAL,BUG,API,UI", requiredMode = Schema.RequiredMode.REQUIRED)
@PathVariable String scene) { @PathVariable String scene) {
return projectTemplateservice.list(projectId, scene); return projectTemplateservice.list(projectId, scene);
} }

View File

@ -10,7 +10,7 @@ public class ModuleDTO implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Schema(description = "模块", allowableValues = {"WORKSTATION", "TEST_PLAN", "UI", "PERFORMANCE_TEST", "API", "CASE", "ISSUE"}) @Schema(description = "模块", allowableValues = {"WORKSTATION", "TEST_PLAN", "UI", "PERFORMANCE_TEST", "API", "CASE", "BUG"})
private String module; private String module;
@Schema(description = "是否启用", allowableValues = {"true", "false"}) @Schema(description = "是否启用", allowableValues = {"true", "false"})

View File

@ -21,6 +21,6 @@ public class ProjectApplicationRequest implements Serializable {
@NotBlank(message = "{project_application.project_id.not_blank}") @NotBlank(message = "{project_application.project_id.not_blank}")
private String projectId; private String projectId;
@Schema(description = "配置类型列表", allowableValues = {"WORKSTATION", "TEST_PLAN", "UI", "PERFORMANCE_TEST", "API", "CASE", "ISSUE"}, requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "配置类型列表", allowableValues = {"WORKSTATION", "TEST_PLAN", "UI", "PERFORMANCE_TEST", "API", "CASE", "BUG"}, requiredMode = Schema.RequiredMode.REQUIRED)
private String type; private String type;
} }

View File

@ -303,7 +303,7 @@ public class BaseTemplateService {
* @param scopeId * @param scopeId
* @param scopeType * @param scopeType
*/ */
public void initIssueDefaultTemplate(String scopeId, TemplateScopeType scopeType) { public void initBugDefaultTemplate(String scopeId, TemplateScopeType scopeType) {
this.initDefaultTemplate(scopeId, "bug_default", scopeType, TemplateScene.BUG); this.initDefaultTemplate(scopeId, "bug_default", scopeType, TemplateScene.BUG);
} }
public void initApiDefaultTemplate(String scopeId, TemplateScopeType scopeType) { public void initApiDefaultTemplate(String scopeId, TemplateScopeType scopeType) {

View File

@ -62,7 +62,7 @@ public class CreateTemplateResourceService implements CreateProjectResourceServi
baseTemplateService.initFunctionalDefaultTemplate(projectId, TemplateScopeType.PROJECT); baseTemplateService.initFunctionalDefaultTemplate(projectId, TemplateScopeType.PROJECT);
break; break;
case BUG: case BUG:
baseTemplateService.initIssueDefaultTemplate(projectId, TemplateScopeType.PROJECT); baseTemplateService.initBugDefaultTemplate(projectId, TemplateScopeType.PROJECT);
break; break;
case API: case API:
baseTemplateService.initApiDefaultTemplate(projectId, TemplateScopeType.PROJECT); baseTemplateService.initApiDefaultTemplate(projectId, TemplateScopeType.PROJECT);

View File

@ -32,8 +32,6 @@ public class OrganizationTemplateService extends BaseTemplateService {
@Resource @Resource
private BaseProjectMapper baseProjectMapper; private BaseProjectMapper baseProjectMapper;
@Resource @Resource
private BaseCustomFieldService baseCustomFieldService;
@Resource
protected ExtOrganizationTemplateMapper extOrganizationTemplateMapper; protected ExtOrganizationTemplateMapper extOrganizationTemplateMapper;
@Resource @Resource
protected BaseOrganizationParameterService baseOrganizationParameterService; protected BaseOrganizationParameterService baseOrganizationParameterService;