fix(缺陷管理): 获取影响版本检查
This commit is contained in:
parent
41b401d526
commit
fe79f36f31
|
@ -346,14 +346,9 @@ public class ZentaoPlatform extends AbstractIssuePlatform {
|
|||
}
|
||||
|
||||
public List<ZentaoBuild> getBuilds() {
|
||||
String relateProjectId = getProjectId(projectId);
|
||||
Boolean exist = checkProjectExist(relateProjectId);
|
||||
if (!exist) {
|
||||
MSException.throwException(Translator.get("zentao_project_id_not_exist"));
|
||||
}
|
||||
Map<String, Object> builds = zentaoClient.getBuildsByCreateMetaData(relateProjectId);
|
||||
Map<String, Object> builds = zentaoClient.getBuildsByCreateMetaData(getProjectId(projectId));
|
||||
if (builds == null || builds.isEmpty()) {
|
||||
builds = zentaoClient.getBuilds(relateProjectId);
|
||||
builds = zentaoClient.getBuilds(getProjectId(projectId));
|
||||
}
|
||||
List<ZentaoBuild> res = new ArrayList<>();
|
||||
builds.forEach((k, v) -> {
|
||||
|
|
|
@ -16,6 +16,7 @@ import io.metersphere.commons.utils.*;
|
|||
import io.metersphere.controller.request.IntegrationRequest;
|
||||
import io.metersphere.dto.CustomFieldDao;
|
||||
import io.metersphere.dto.IssueTemplateDao;
|
||||
import io.metersphere.i18n.Translator;
|
||||
import io.metersphere.log.utils.ReflexObjectUtil;
|
||||
import io.metersphere.log.vo.DetailColumn;
|
||||
import io.metersphere.log.vo.OperatingLogDetails;
|
||||
|
@ -337,8 +338,15 @@ public class IssuesService {
|
|||
}
|
||||
|
||||
public List<ZentaoBuild> getZentaoBuilds(IssuesRequest request) {
|
||||
ZentaoPlatform platform = (ZentaoPlatform) IssueFactory.createPlatform(IssuesManagePlatform.Zentao.name(), request);
|
||||
return platform.getBuilds();
|
||||
try {
|
||||
ZentaoPlatform platform = (ZentaoPlatform) IssueFactory.createPlatform(IssuesManagePlatform.Zentao.name(), request);
|
||||
return platform.getBuilds();
|
||||
} catch (Exception e) {
|
||||
LogUtil.error("get zentao builds fail.");
|
||||
LogUtil.error(e.getMessage(), e);
|
||||
MSException.throwException(Translator.get("zentao_get_project_builds_fail"));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<IssuesDao> list(IssuesRequest request) {
|
||||
|
|
|
@ -165,6 +165,7 @@ step_model_tip=Step description fill in STEP, text description please fill in TE
|
|||
case_status_not_exist=The use case status must be Prepare, Underway way and Completed
|
||||
issue_project_not_exist=ID does not exist or other errors
|
||||
tapd_project_not_exist=The associated TAPD item ID does not exist
|
||||
zentao_get_project_builds_fail=Get Affecting Version Errors
|
||||
zentao_project_id_not_exist=The associated Zen Tao ID does not exist or other errors
|
||||
#ldap
|
||||
ldap_url_is_null=LDAP address is empty
|
||||
|
|
|
@ -165,6 +165,7 @@ step_model_tip=步骤描述填写 STEP,文本描述请填写 TEXT (非必填)
|
|||
case_status_not_exist=用例状态必须为未开始(Prepare)、进行中(Underway)、已完成(Completed)
|
||||
issue_project_not_exist=ID不存在或其它错误
|
||||
tapd_project_not_exist=关联的TAPD项目ID不存在
|
||||
zentao_get_project_builds_fail=获取影响版本错误
|
||||
zentao_project_id_not_exist=关联的禅道ID不存在或其它错误
|
||||
#ldap
|
||||
ldap_url_is_null=LDAP地址为空
|
||||
|
|
|
@ -165,6 +165,7 @@ step_model_tip=步驟描述填寫 STEP,文本描述請填寫 TEXT (非必填)
|
|||
case_status_not_exist=用例狀態必須為未開始(Prepare)、進行中(Underway)、已完成(Completed)
|
||||
issue_project_not_exist=ID不存在或其它錯誤
|
||||
tapd_project_not_exist=關聯的TAPD項目ID不存在
|
||||
zentao_get_project_builds_fail=獲取影響版本錯誤
|
||||
zentao_project_id_not_exist=關聯的禪道ID不存在或其它錯誤
|
||||
#ldap
|
||||
ldap_url_is_null=LDAP地址為空
|
||||
|
|
Loading…
Reference in New Issue