fix(测试跟踪): 缺陷管理页面前端控制台报错

--bug=1021329 --user=陈建星 【测试跟踪】点击缺陷管理报500 https://www.tapd.cn/55049933/s/1320666
This commit is contained in:
chenjianxing 2022-12-29 11:28:52 +08:00 committed by jianxing
parent f52a472bab
commit 5d573053bb
3 changed files with 13 additions and 5 deletions

View File

@ -1428,8 +1428,11 @@ public class IssuesService {
public List<PlatformStatusDTO> getPlatformStatus(PlatformIssueTypeRequest request) {
List<PlatformStatusDTO> platformStatusDTOS = new ArrayList<>();
Project project = baseProjectService.getProjectById(request.getProjectId());
String projectConfig = PlatformPluginService.getCompatibleProjectConfig(project);
String platform = project.getPlatform();
if (StringUtils.equals(platform, IssuesManagePlatform.Local.name())) {
return null;
}
String projectConfig = PlatformPluginService.getCompatibleProjectConfig(project);
if (PlatformPluginService.isPluginPlatform(platform)) {
return platformPluginService.getPlatform(platform)
.getStatusList(projectConfig)

View File

@ -105,6 +105,9 @@ public class PlatformPluginService {
public static String getCompatibleProjectConfig(Project project) {
String issueConfig = project.getIssueConfig();
if (StringUtils.isBlank(issueConfig)) {
return StringUtils.EMPTY;
}
Map map = JSON.parseMap(issueConfig);
compatibleProjectKey(map, "jiraKey", project.getJiraKey());
compatibleProjectKey(map, "tapdId", project.getTapdId());

View File

@ -305,16 +305,18 @@ export default {
this.hasLicense = hasLicense();
getPlatformStatus( {
getPlatformStatus({
projectId: getCurrentProjectID(),
workspaceId: getCurrentWorkspaceId()
}).then((r) => {
this.platformStatus = r.data;
this.platformStatusMap = new Map();
this.platformStatus = r.data;
this.platformStatusMap = new Map();
if (this.platformStatus) {
this.platformStatus.forEach(item => {
this.platformStatusMap.set(item.value, item.label);
});
});
}
});
},
computed: {
platformFilters() {