From b0d76bb5b236aee13587c14cc3f413cf9a0c4e55 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Tue, 12 Sep 2023 11:19:15 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E7=BC=BA=E9=99=B7=E7=AE=A1=E7=90=86=E5=85=B3=E8=81=94=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E7=94=A8=E4=BE=8B=E5=BC=B9=E7=AA=97=E6=9C=AA=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E6=8E=89=E5=B7=B2=E5=85=B3=E8=81=94=E7=9A=84=E7=94=A8?= =?UTF-8?q?=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1030240 --user=宋昌昌 【测试跟踪】github#26675,缺陷管理中关联用例窗口,未过滤掉已关联用例,导致重复关联 https://www.tapd.cn/55049933/s/1415103 --- .../src/business/issue/IssueEditDetail.vue | 40 +++++++------------ .../src/business/issue/TestCaseIssueList.vue | 4 +- .../src/business/issue/TestCaseRelateList.vue | 13 ++++-- 3 files changed, 26 insertions(+), 31 deletions(-) diff --git a/test-track/frontend/src/business/issue/IssueEditDetail.vue b/test-track/frontend/src/business/issue/IssueEditDetail.vue index 0a4f804a9e..02095ee4c1 100644 --- a/test-track/frontend/src/business/issue/IssueEditDetail.vue +++ b/test-track/frontend/src/business/issue/IssueEditDetail.vue @@ -340,54 +340,43 @@ import TemplateComponentEditHeader from "@/business/plan/view/comonents/report/TemplateComponentEditHeader"; import MsFormDivider from "metersphere-frontend/src/components/MsFormDivider"; import FormRichTextItem from "metersphere-frontend/src/components/FormRichTextItem"; -import { - buildCustomFields, - parseCustomField, - parseCustomFieldForId, -} from "metersphere-frontend/src/utils/custom_field"; +import {buildCustomFields, parseCustomFieldForId,} from "metersphere-frontend/src/utils/custom_field"; import CustomFiledComponent from "metersphere-frontend/src/components/template/CustomFiledComponent"; import TestCaseIssueList from "@/business/issue/TestCaseIssueList"; import IssueEditDetail from "@/business/issue/IssueEditDetail"; -import { - byteToSize, - getTypeByFileName, - getUUID, -} from "metersphere-frontend/src/utils"; +import {byteToSize, getTypeByFileName, getUUID,} from "metersphere-frontend/src/utils"; import { getCurrentProjectID, getCurrentUser, - getCurrentWorkspaceId, getCurrentUserId, + getCurrentWorkspaceId, } from "metersphere-frontend/src/utils/token"; -import { - hasLicense, - hasPermission, -} from "metersphere-frontend/src/utils/permission"; +import {hasLicense, hasPermission,} from "metersphere-frontend/src/utils/permission"; import { enableThirdPartTemplate, - getIssuePartTemplateWithProject, - saveOrUpdateIssue, - saveFollow, - getFollow, getComments, - getTapdUser, - getPlatformTransitions, + getFollow, + getIssuePartTemplateWithProject, getPlatformFormOption, + getPlatformTransitions, getTapdCurrentOwner, + getTapdUser, + saveFollow, + saveOrUpdateIssue, } from "@/api/issue"; import { - uploadIssueAttachment, attachmentList, deleteIssueAttachment, - unrelatedIssueAttachment, - relatedIssueAttachment, dumpAttachment, + relatedIssueAttachment, + unrelatedIssueAttachment, + uploadIssueAttachment, } from "@/api/attachment"; import CustomFiledFormItem from "metersphere-frontend/src/components/form/CustomFiledFormItem"; import MsMarkDownText from "metersphere-frontend/src/components/MsMarkDownText"; import IssueComment from "@/business/issue/IssueComment"; import ReviewCommentItem from "@/business/review/commom/ReviewCommentItem"; -import { TokenKey } from "metersphere-frontend/src/utils/constants"; +import {TokenKey} from "metersphere-frontend/src/utils/constants"; import TestCaseAttachment from "@/business/case/components/TestCaseAttachment"; import axios from "axios"; import MsFileMetadataList from "metersphere-frontend/src/components/environment/commons/variable/QuoteFileList"; @@ -568,6 +557,7 @@ export default { if (this.$refs.testCaseIssueList) { this.$refs.testCaseIssueList.clear(); this.$refs.testCaseIssueList.isXpack = hasLicense(); + this.$refs.testCaseIssueList.testCaseContainIds = new Set(); } this.$nextTick(() => { getIssuePartTemplateWithProject( diff --git a/test-track/frontend/src/business/issue/TestCaseIssueList.vue b/test-track/frontend/src/business/issue/TestCaseIssueList.vue index fcb8c905de..e928e87e28 100644 --- a/test-track/frontend/src/business/issue/TestCaseIssueList.vue +++ b/test-track/frontend/src/business/issue/TestCaseIssueList.vue @@ -55,7 +55,8 @@ import MsTableColumn from "metersphere-frontend/src/components/table/MsTableColu import PriorityTableItem from "@/business/common/tableItems/planview/PriorityTableItem"; import TypeTableItem from "@/business/common/tableItems/planview/TypeTableItem"; import TestCaseRelateList from "@/business/issue/TestCaseRelateList"; -import { getTestCaseIssueList } from "@/api/testCase"; +import {getTestCaseIssueList} from "@/api/testCase"; + export default { name: "TestCaseIssueList", components: { @@ -137,7 +138,6 @@ export default { this.addIds.add(i.id); }); this.tableData.push(...selectData); - this.testCaseContainIds = new Set(); }, }, }; diff --git a/test-track/frontend/src/business/issue/TestCaseRelateList.vue b/test-track/frontend/src/business/issue/TestCaseRelateList.vue index bfa872f00e..93b0e58296 100644 --- a/test-track/frontend/src/business/issue/TestCaseRelateList.vue +++ b/test-track/frontend/src/business/issue/TestCaseRelateList.vue @@ -19,7 +19,7 @@ @@ -75,7 +75,7 @@