fix(测试跟踪): 平台插件同步自定义字段有误

This commit is contained in:
chenjianxing 2022-12-15 13:43:34 +08:00 committed by jianxing
parent a2559b26b5
commit 33fdb9da96
4 changed files with 6 additions and 45 deletions

View File

@ -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<Project> getByCaseTemplateId(String templateId) {
ProjectExample example = new ProjectExample();
example.createCriteria().andCaseTemplateIdEqualTo(templateId);

View File

@ -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<Project> getByCaseTemplateId(String templateId) {
ProjectExample example = new ProjectExample();
example.createCriteria().andCaseTemplateIdEqualTo(templateId);

View File

@ -496,8 +496,6 @@ public class IssuesService {
public List<String> 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<String> 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<IssuesDao> 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) {

View File

@ -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));
}