fix(测试跟踪): 缺陷高级搜索所属平台缺少AzureDevops选项

--bug=1023340 --user=陈建星 【测试跟踪】功能用例-编辑-关联现有缺陷-筛选-所属平台无AzureDevops https://www.tapd.cn/55049933/s/1337771
This commit is contained in:
chenjianxing 2023-02-19 12:30:28 +08:00 committed by jianxing
parent e4971fc98c
commit 4c9adc8d8a
3 changed files with 22 additions and 0 deletions

View File

@ -132,6 +132,7 @@ import HomePagination from "@/business/home/components/pagination/HomePagination
import MsTable from "metersphere-frontend/src/components/new-ui/MsTable";
import MsTableColumn from "metersphere-frontend/src/components/table/MsTableColumn";
import {
getPlatformOption,
getRelateIssues,
isThirdPartEnable,
testCaseIssueRelate,
@ -145,6 +146,7 @@ import { TEST_CASE_RELEVANCE_ISSUE_LIST } from "@/business/utils/sdk-utils";
import MsSearch from "metersphere-frontend/src/components/search/MsSearch";
import MsDrawerComponent from "../common/MsDrawerComponent";
import MsTableAdvSearch from "metersphere-frontend/src/components/new-ui/MsTableAdvSearch";
import {setIssuePlatformComponent} from "@/business/issue/issue";
export default {
name: "CaseIssueRelateList",
@ -202,6 +204,10 @@ export default {
this.getIssues();
this.visible = true;
this.$refs.relevanceDialog.open();
getPlatformOption()
.then((r) => {
setIssuePlatformComponent(r.data, this.page.condition.components);
});
},
getIssues() {
this.page.condition.projectId = this.projectId;

View File

@ -185,6 +185,7 @@ import {
import MsMarkDownText from "metersphere-frontend/src/components/MsMarkDownText";
import {hasLicense} from "metersphere-frontend/src/utils/permission";
import MsReviewTableItem from "@/business/issue/MsReviewTableItem";
import {setIssuePlatformComponent} from "@/business/issue/issue";
export default {
name: "IssueList",
@ -311,6 +312,7 @@ export default {
getPlatformOption()
.then((r) => {
this.platformOptions = r.data;
setIssuePlatformComponent(this.platformOptions, this.page.condition.components);
});
this.hasLicense = hasLicense();

View File

@ -0,0 +1,14 @@
export function setIssuePlatformComponent(platformOptions, components) {
components.forEach(item => {
if (item.key === 'platform') {
item.options = [
{label: "Tapd", value: "Tapd"},
{label: "Local", value: "Local"},
{label: "AzureDevops", value: "Azure Devops"}
];
platformOptions.forEach(option => {
item.options.push({label: option.text, value: option.value});
});
}
});
}