diff --git a/project-management/backend/src/main/java/io/metersphere/service/ProjectService.java b/project-management/backend/src/main/java/io/metersphere/service/ProjectService.java index 340f3a77de..794ec7f720 100644 --- a/project-management/backend/src/main/java/io/metersphere/service/ProjectService.java +++ b/project-management/backend/src/main/java/io/metersphere/service/ProjectService.java @@ -283,14 +283,6 @@ public class ProjectService { return project; } - - public boolean isThirdPartTemplate(Project project) { - if (project.getThirdPartTemplate() != null && project.getThirdPartTemplate() && project.getPlatform().equals(IssuesManagePlatform.Jira.name())) { - return true; - } - return false; - } - public List getByCaseTemplateId(String templateId) { ProjectExample example = new ProjectExample(); example.createCriteria().andCaseTemplateIdEqualTo(templateId); diff --git a/system-setting/backend/src/main/java/io/metersphere/service/SystemProjectService.java b/system-setting/backend/src/main/java/io/metersphere/service/SystemProjectService.java index 65b2aa8caf..d6777442e5 100644 --- a/system-setting/backend/src/main/java/io/metersphere/service/SystemProjectService.java +++ b/system-setting/backend/src/main/java/io/metersphere/service/SystemProjectService.java @@ -126,7 +126,7 @@ public class SystemProjectService { if (quotaService != null) { quotaService.projectUseDefaultQuota(pjId); } - + // 创建默认版本 addProjectVersion(project); // 初始化项目应用管理 @@ -339,11 +339,6 @@ public class SystemProjectService { return project; } - - public boolean isThirdPartTemplate(Project project) { - return project.getThirdPartTemplate() != null && project.getThirdPartTemplate() && project.getPlatform().equals(IssuesManagePlatform.Jira.name()); - } - public List getByCaseTemplateId(String templateId) { ProjectExample example = new ProjectExample(); example.createCriteria().andCaseTemplateIdEqualTo(templateId); diff --git a/test-track/backend/src/main/java/io/metersphere/service/IssuesService.java b/test-track/backend/src/main/java/io/metersphere/service/IssuesService.java index d2a6a49066..c313481d95 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/IssuesService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/IssuesService.java @@ -496,8 +496,6 @@ public class IssuesService { public List getPlatforms(Project project) { String workspaceId = project.getWorkspaceId(); boolean tapd = isIntegratedPlatform(workspaceId, IssuesManagePlatform.Tapd.toString()); - boolean jira = isIntegratedPlatform(workspaceId, IssuesManagePlatform.Jira.toString()); - boolean zentao = isIntegratedPlatform(workspaceId, IssuesManagePlatform.Zentao.toString()); boolean azure = isIntegratedPlatform(workspaceId, IssuesManagePlatform.AzureDevops.toString()); List platforms = new ArrayList<>(); @@ -510,20 +508,6 @@ public class IssuesService { } - if (jira) { - String jiraKey = project.getJiraKey(); - if (StringUtils.isNotBlank(jiraKey) && PlatformPluginService.isPluginPlatform(project.getPlatform())) { - platforms.add(IssuesManagePlatform.Jira.name()); - } - } - - if (zentao) { - String zentaoId = project.getZentaoId(); - if (StringUtils.isNotBlank(zentaoId) && StringUtils.equals(project.getPlatform(), IssuesManagePlatform.Zentao.toString())) { - platforms.add(IssuesManagePlatform.Zentao.name()); - } - } - if (azure) { String azureDevopsId = project.getAzureDevopsId(); if (StringUtils.isNotBlank(azureDevopsId) && StringUtils.equals(project.getPlatform(), IssuesManagePlatform.AzureDevops.toString())) { @@ -945,10 +929,10 @@ public class IssuesService { } private String getDefaultCustomField(Project project) { - if (!trackProjectService.isThirdPartTemplate(project)) { - return getDefaultCustomFields(project.getId()); + if (isThirdPartTemplate(project)) { + return null; } - return null; + return getDefaultCustomFields(project.getId()); } public void syncPluginThirdPartyIssues(List issues, Project project, String defaultCustomFields) { @@ -1057,10 +1041,6 @@ public class IssuesService { } private void syncAllPluginIssueAttachment(Project project, IssueSyncRequest syncIssuesResult) { - // todo 所有平台改造完之后删除 - if (!StringUtils.equals(project.getPlatform(), IssuesManagePlatform.Jira.name())) { - return; - } SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH); try { AttachmentModuleRelationMapper batchAttachmentModuleRelationMapper = sqlSession.getMapper(AttachmentModuleRelationMapper.class); @@ -1510,7 +1490,8 @@ public class IssuesService { public boolean isThirdPartTemplate(Project project) { return project.getThirdPartTemplate() != null && project.getThirdPartTemplate() - && PlatformPluginService.isPluginPlatform(project.getPlatform()); + && PlatformPluginService.isPluginPlatform(project.getPlatform()) + && platformPluginService.isThirdPartTemplateSupport(project.getPlatform()); } public void checkThirdProjectExist(Project project) { diff --git a/test-track/backend/src/main/java/io/metersphere/service/wapper/TrackProjectService.java b/test-track/backend/src/main/java/io/metersphere/service/wapper/TrackProjectService.java index 9d63842c20..40360cafa5 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/wapper/TrackProjectService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/wapper/TrackProjectService.java @@ -26,13 +26,6 @@ public class TrackProjectService { @Resource ProjectMapper projectMapper; - public boolean isThirdPartTemplate(Project project) { - if (project.getThirdPartTemplate() != null && project.getThirdPartTemplate() && project.getPlatform().equals(IssuesManagePlatform.Jira.name())) { - return true; - } - return false; - } - public boolean useCustomNum(String projectId) { return useCustomNum(baseProjectService.getProjectById(projectId)); }