fix(测试用例): 查询禅道需求失败的问题
This commit is contained in:
parent
834408def2
commit
5093a670ce
|
@ -14,10 +14,10 @@ import java.util.List;
|
|||
@RestController
|
||||
public class TestCaseDemandController {
|
||||
@Resource
|
||||
private DemandService DemandService;
|
||||
private DemandService demandService;
|
||||
|
||||
@GetMapping("/list/{projectId}")
|
||||
public List<DemandDTO> getDemandList(@PathVariable String projectId) {
|
||||
return DemandService.getDemandList(projectId);
|
||||
return demandService.getDemandList(projectId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
package io.metersphere.track.service;
|
||||
|
||||
import io.metersphere.base.domain.Issues;
|
||||
import io.metersphere.base.domain.Project;
|
||||
import io.metersphere.base.domain.Workspace;
|
||||
import io.metersphere.base.mapper.ProjectMapper;
|
||||
import io.metersphere.base.mapper.WorkspaceMapper;
|
||||
import io.metersphere.commons.constants.IssuesManagePlatform;
|
||||
import io.metersphere.commons.user.SessionUser;
|
||||
import io.metersphere.commons.utils.SessionUtils;
|
||||
import io.metersphere.service.ProjectService;
|
||||
import io.metersphere.track.dto.DemandDTO;
|
||||
import io.metersphere.track.issue.AbstractIssuePlatform;
|
||||
import io.metersphere.track.issue.IssueFactory;
|
||||
|
@ -23,7 +21,7 @@ import java.util.List;
|
|||
@Transactional(rollbackFor = Exception.class)
|
||||
public class DemandService {
|
||||
@Resource
|
||||
private ProjectService projectService;
|
||||
private WorkspaceMapper workspaceMapper;
|
||||
@Resource
|
||||
private IssuesService issuesService;
|
||||
@Resource
|
||||
|
@ -31,9 +29,8 @@ public class DemandService {
|
|||
|
||||
public List<DemandDTO> getDemandList(String projectId) {
|
||||
Project project = projectMapper.selectByPrimaryKey(projectId);
|
||||
SessionUser user = SessionUtils.getUser();
|
||||
|
||||
String orgId = user.getLastOrganizationId();
|
||||
Workspace workspace = workspaceMapper.selectByPrimaryKey(project.getWorkspaceId());
|
||||
String orgId = workspace.getOrganizationId();
|
||||
boolean tapd = issuesService.isIntegratedPlatform(orgId, IssuesManagePlatform.Tapd.toString());
|
||||
boolean jira = issuesService.isIntegratedPlatform(orgId, IssuesManagePlatform.Jira.toString());
|
||||
boolean zentao = issuesService.isIntegratedPlatform(orgId, IssuesManagePlatform.Zentao.toString());
|
||||
|
@ -62,6 +59,7 @@ public class DemandService {
|
|||
}
|
||||
}
|
||||
|
||||
issueRequest.setOrganizationId(orgId);
|
||||
List<AbstractIssuePlatform> platformList = IssueFactory.createPlatforms(platforms, issueRequest);
|
||||
platformList.forEach(platform -> {
|
||||
List<DemandDTO> demand = platform.getDemandList(projectId);
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
<form-rich-text-item :label-width="formLabelWidth" v-if="testCase.stepModel === 'TEXT'" :disabled="true" :title="$t('test_track.case.expected_results')" :data="testCase" prop="expectedResult"/>
|
||||
<form-rich-text-item :label-width="formLabelWidth" v-if="testCase.stepModel === 'TEXT'" :title="$t('test_track.plan_view.actual_result')" :data="testCase" prop="actualResult"/>
|
||||
|
||||
<test-case-edit-other-info :plan-id="testCase.planId" v-if="otherInfoActive" @openTest="openTest" :read-only="true" :is-test-plan="true" :project-id="projectId" :form="testCase" :case-id="testCase.caseId" ref="otherInfo"/>
|
||||
<test-case-edit-other-info :plan-id="testCase.planId" v-if="otherInfoActive" @openTest="openTest" :read-only="true" :is-test-plan="true" :project-id="testCase.projectId" :form="testCase" :case-id="testCase.caseId" ref="otherInfo"/>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue