fix(缺陷管理): 缺陷编辑页面平台处理人回显
--bug=1007501 --user=郭雨琦 【测试跟踪】提到第三方平台的缺陷,编辑的时候没有显示处理人
This commit is contained in:
parent
611785abfa
commit
548eb9dcb6
|
@ -16,4 +16,5 @@ public class IssuesDao extends IssuesWithBLOBs {
|
|||
private List<String> caseIds;
|
||||
private String caseId;
|
||||
private int totalIssueCount;
|
||||
private List<String> tapdUsers;
|
||||
}
|
||||
|
|
|
@ -52,9 +52,28 @@ public class TapdPlatform extends AbstractIssuePlatform {
|
|||
} else {
|
||||
issues = extIssuesMapper.getIssuesByCaseId(issuesRequest);
|
||||
}
|
||||
for (IssuesDao issue : issues) {
|
||||
if(StringUtils.isNotBlank(issue.getPlatform())&&issue.getPlatform().equals("Tapd")){
|
||||
List<String> tapdUsers = getTapdUsers(issue.getProjectId(), issue.getPlatformId());
|
||||
issue.setTapdUsers(tapdUsers);
|
||||
}
|
||||
}
|
||||
return issues;
|
||||
}
|
||||
|
||||
public List<String> getTapdUsers(String projectId,String num){
|
||||
List<String>ids = new ArrayList<>(1);
|
||||
ids.add(num);
|
||||
List<JSONObject> tapdIssues = tapdClient.getIssueForPageByIds(getProjectId(projectId),1,50,ids).getData();
|
||||
List<String>tapdUsers = new ArrayList<>(tapdIssues.size());
|
||||
for (JSONObject tapdIssue : tapdIssues) {
|
||||
JSONObject bug = tapdIssue.getJSONObject("Bug");
|
||||
String currentOwner = bug.getString("current_owner");
|
||||
tapdUsers.add(currentOwner);
|
||||
}
|
||||
return tapdUsers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DemandDTO> getDemandList(String projectId) {
|
||||
List<DemandDTO> demandList = new ArrayList<>();
|
||||
|
|
|
@ -369,6 +369,11 @@ public class IssuesService {
|
|||
.collect(Collectors.toList());
|
||||
item.setCaseIds(caseIds);
|
||||
item.setCaseCount(testCaseIssues.size());
|
||||
if(StringUtils.equals(item.getPlatform(),"Tapd")){
|
||||
TapdPlatform platform = (TapdPlatform) IssueFactory.createPlatform(item.getPlatform(), request);
|
||||
List<String> tapdUsers = platform.getTapdUsers(item.getProjectId(), item.getPlatformId());
|
||||
item.setTapdUsers(tapdUsers);
|
||||
}
|
||||
});
|
||||
return issues;
|
||||
}
|
||||
|
@ -642,4 +647,5 @@ public class IssuesService {
|
|||
.andProjectIdEqualTo(projectId);
|
||||
return issuesMapper.selectByExampleWithBLOBs(example);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -176,7 +176,7 @@ import {
|
|||
} from "@/common/js/tableUtils";
|
||||
import MsContainer from "@/business/components/common/components/MsContainer";
|
||||
import MsMainContainer from "@/business/components/common/components/MsMainContainer";
|
||||
import {getCurrentProjectID} from "@/common/js/utils";
|
||||
import {getCurrentProjectID, getCurrentWorkspaceId} from "@/common/js/utils";
|
||||
import {getIssueTemplate} from "@/network/custom-field-template";
|
||||
import {getProjectMember} from "@/network/user";
|
||||
|
||||
|
@ -263,8 +263,9 @@ export default {
|
|||
projectId() {
|
||||
return getCurrentProjectID();
|
||||
},
|
||||
|
||||
|
||||
workspaceId(){
|
||||
return getCurrentWorkspaceId();
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getMaintainerOptions();
|
||||
|
@ -278,6 +279,7 @@ export default {
|
|||
},
|
||||
getIssues() {
|
||||
this.page.condition.projectId = this.projectId;
|
||||
this.page.condition.workspaceId= this.workspaceId;
|
||||
this.page.condition.orders = getLastTableSortField(this.tableHeaderKey);
|
||||
this.page.result = getIssues(this.page);
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue