fix(测试跟踪): 平台插件同步自定义字段有误
This commit is contained in:
parent
a2559b26b5
commit
33fdb9da96
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue