use of io.elastest.etm.model.external.ExternalProject in project elastest-torm by elastest.
the class TestLinkService method syncProject.
public void syncProject(TestProject project) {
ExternalProject externalProject = new ExternalProject(new Long(0));
externalProject.setName(project.getName());
externalProject.setType(TypeEnum.TESTLINK);
externalProject.setExternalId(project.getId().toString());
externalProject.setExternalSystemId(this.getSystemId());
try {
externalProject = externalProjectRepository.save(externalProject);
} catch (DataIntegrityViolationException existException) {
ExternalProject savedPj = externalProjectRepository.findByExternalIdAndExternalSystemId(externalProject.getExternalId(), externalProject.getExternalSystemId());
externalProject.setId(savedPj.getId());
externalProject = externalProjectRepository.save(externalProject);
}
this.syncProjectTestPlans(project.getId(), externalProject);
}
Aggregations