From 9012507833021a50549ecbcd36a18de106cea582 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Tue, 21 Feb 2023 11:35:52 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E5=85=B3=E8=81=94=E7=BC=BA=E9=99=B7=E6=B1=87=E6=80=BB=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1023324 --user=宋昌昌 【测试跟踪】功能用例-编辑-关联现有缺陷-列表字段和原型不一致 https://www.tapd.cn/55049933/s/1339201 --- .../io/metersphere/service/IssuesService.java | 18 +- .../business/case/components/TestCaseList.vue | 1 - .../case/components/case/CaseIssueRelate.vue | 28 ++- .../components/case/CaseIssueRelateList.vue | 160 ++++++++++++------ .../components/public/PublicTestCaseList.vue | 1 - 5 files changed, 133 insertions(+), 75 deletions(-) diff --git a/test-track/backend/src/main/java/io/metersphere/service/IssuesService.java b/test-track/backend/src/main/java/io/metersphere/service/IssuesService.java index f42f5fa897..5b7298655f 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/IssuesService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/IssuesService.java @@ -432,6 +432,13 @@ public class IssuesService { ServiceUtils.getDefaultOrder(issueRequest.getOrders()); issueRequest.setRefType(refType); List issues = extIssuesMapper.getIssuesByCaseId(issueRequest); + Map userMap = getUserMap(issues); + issues.forEach(issue -> { + User user = userMap.get(issue.getCreator()); + if (user != null) { + issue.setCreatorName(user.getName()); + } + }); handleCustomFieldStatus(issues); return DistinctKeyUtil.distinctByKey(issues, IssuesDao::getId); } @@ -1199,7 +1206,16 @@ public class IssuesService { } public List relateList(IssuesRequest request) { - return extIssuesMapper.getIssues(request); + List issues = extIssuesMapper.getIssues(request); + Map userMap = getUserMap(issues); + issues.forEach(issue -> { + User user = userMap.get(issue.getCreator()); + if (user != null) { + issue.setCreatorName(user.getName()); + } + }); + handleCustomFieldStatus(issues); + return issues; } public void userAuth(AuthUserIssueRequest authUserIssueRequest) { diff --git a/test-track/frontend/src/business/case/components/TestCaseList.vue b/test-track/frontend/src/business/case/components/TestCaseList.vue index 6b7a7079ce..c310689503 100644 --- a/test-track/frontend/src/business/case/components/TestCaseList.vue +++ b/test-track/frontend/src/business/case/components/TestCaseList.vue @@ -212,7 +212,6 @@ - diff --git a/test-track/frontend/src/business/case/components/case/CaseIssueRelate.vue b/test-track/frontend/src/business/case/components/case/CaseIssueRelate.vue index 93f8be7cb0..7282f44280 100644 --- a/test-track/frontend/src/business/case/components/case/CaseIssueRelate.vue +++ b/test-track/frontend/src/business/case/components/case/CaseIssueRelate.vue @@ -88,7 +88,7 @@ {{ scope.row.platformStatus ? tapdIssueStatusMap[scope.row.platformStatus] : '--' }} - {{ scope.row.platformStatus ? tapdIssueStatusMap[scope.row.platformStatus] : '--' }} + {{ '--' }} {{ platformStatusMap.get(scope.row.platformStatus) }} @@ -100,21 +100,6 @@ - - - - + + + @@ -217,7 +209,7 @@ export default { MsTableColumn, MsTable, TestPlanIssueEdit, - MsNewUiSearch, + MsNewUiSearch }, data() { return { @@ -239,6 +231,8 @@ export default { status: [], issueRelateVisible: false, condition: {}, + platformStatus: [], + platformStatusMap: new Map(), }; }, props: { diff --git a/test-track/frontend/src/business/case/components/case/CaseIssueRelateList.vue b/test-track/frontend/src/business/case/components/case/CaseIssueRelateList.vue index e6c72a0a92..feb0bb7e77 100644 --- a/test-track/frontend/src/business/case/components/case/CaseIssueRelateList.vue +++ b/test-track/frontend/src/business/case/components/case/CaseIssueRelateList.vue @@ -44,64 +44,84 @@ class="relate-issue-table" ref="table" > - - - - + + + + + - - + + - - + - - - + + - - + + + + + -