fix(测试跟踪): 关联缺陷汇总问题
--bug=1023324 --user=宋昌昌 【测试跟踪】功能用例-编辑-关联现有缺陷-列表字段和原型不一致 https://www.tapd.cn/55049933/s/1339201
This commit is contained in:
parent
15721d3067
commit
9012507833
|
@ -432,6 +432,13 @@ public class IssuesService {
|
||||||
ServiceUtils.getDefaultOrder(issueRequest.getOrders());
|
ServiceUtils.getDefaultOrder(issueRequest.getOrders());
|
||||||
issueRequest.setRefType(refType);
|
issueRequest.setRefType(refType);
|
||||||
List<IssuesDao> issues = extIssuesMapper.getIssuesByCaseId(issueRequest);
|
List<IssuesDao> issues = extIssuesMapper.getIssuesByCaseId(issueRequest);
|
||||||
|
Map<String, User> userMap = getUserMap(issues);
|
||||||
|
issues.forEach(issue -> {
|
||||||
|
User user = userMap.get(issue.getCreator());
|
||||||
|
if (user != null) {
|
||||||
|
issue.setCreatorName(user.getName());
|
||||||
|
}
|
||||||
|
});
|
||||||
handleCustomFieldStatus(issues);
|
handleCustomFieldStatus(issues);
|
||||||
return DistinctKeyUtil.distinctByKey(issues, IssuesDao::getId);
|
return DistinctKeyUtil.distinctByKey(issues, IssuesDao::getId);
|
||||||
}
|
}
|
||||||
|
@ -1199,7 +1206,16 @@ public class IssuesService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<IssuesDao> relateList(IssuesRequest request) {
|
public List<IssuesDao> relateList(IssuesRequest request) {
|
||||||
return extIssuesMapper.getIssues(request);
|
List<IssuesDao> issues = extIssuesMapper.getIssues(request);
|
||||||
|
Map<String, User> 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) {
|
public void userAuth(AuthUserIssueRequest authUserIssueRequest) {
|
||||||
|
|
|
@ -212,7 +212,6 @@
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
</ms-table>
|
</ms-table>
|
||||||
|
|
|
@ -88,7 +88,7 @@
|
||||||
{{ scope.row.platformStatus ? tapdIssueStatusMap[scope.row.platformStatus] : '--' }}
|
{{ scope.row.platformStatus ? tapdIssueStatusMap[scope.row.platformStatus] : '--' }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else-if="scope.row.platform ==='Local'">
|
<span v-else-if="scope.row.platform ==='Local'">
|
||||||
{{ scope.row.platformStatus ? tapdIssueStatusMap[scope.row.platformStatus] : '--' }}
|
{{ '--' }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else-if="platformStatusMap && platformStatusMap.get(scope.row.platformStatus)">
|
<span v-else-if="platformStatusMap && platformStatusMap.get(scope.row.platformStatus)">
|
||||||
{{ platformStatusMap.get(scope.row.platformStatus) }}
|
{{ platformStatusMap.get(scope.row.platformStatus) }}
|
||||||
|
@ -100,21 +100,6 @@
|
||||||
</template>
|
</template>
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
|
|
||||||
<ms-table-column
|
|
||||||
v-else
|
|
||||||
:field="item"
|
|
||||||
:label="$t('test_track.issue.status')"
|
|
||||||
prop="status"
|
|
||||||
>
|
|
||||||
<template v-slot="scope">
|
|
||||||
<span>{{
|
|
||||||
issueStatusMap[scope.row.status]
|
|
||||||
? issueStatusMap[scope.row.status]
|
|
||||||
: scope.row.status
|
|
||||||
}}</span>
|
|
||||||
</template>
|
|
||||||
</ms-table-column>
|
|
||||||
|
|
||||||
<span v-for="field in issueTemplate.customFields" :key="field.id">
|
<span v-for="field in issueTemplate.customFields" :key="field.id">
|
||||||
<ms-table-column
|
<ms-table-column
|
||||||
:field="item"
|
:field="item"
|
||||||
|
@ -157,6 +142,13 @@
|
||||||
>
|
>
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
|
|
||||||
|
<ms-table-column
|
||||||
|
:field="item"
|
||||||
|
:label="$t('test_track.review.creator')"
|
||||||
|
prop="creatorName"
|
||||||
|
>
|
||||||
|
</ms-table-column>
|
||||||
|
|
||||||
<issue-description-table-item :field="item" />
|
<issue-description-table-item :field="item" />
|
||||||
</span>
|
</span>
|
||||||
</ms-table>
|
</ms-table>
|
||||||
|
@ -217,7 +209,7 @@ export default {
|
||||||
MsTableColumn,
|
MsTableColumn,
|
||||||
MsTable,
|
MsTable,
|
||||||
TestPlanIssueEdit,
|
TestPlanIssueEdit,
|
||||||
MsNewUiSearch,
|
MsNewUiSearch
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -239,6 +231,8 @@ export default {
|
||||||
status: [],
|
status: [],
|
||||||
issueRelateVisible: false,
|
issueRelateVisible: false,
|
||||||
condition: {},
|
condition: {},
|
||||||
|
platformStatus: [],
|
||||||
|
platformStatusMap: new Map(),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -44,23 +44,47 @@
|
||||||
class="relate-issue-table"
|
class="relate-issue-table"
|
||||||
ref="table"
|
ref="table"
|
||||||
>
|
>
|
||||||
|
<span v-for="item in fields" :key="item.key">
|
||||||
<ms-table-column
|
<ms-table-column
|
||||||
|
:field="item"
|
||||||
:label="$t('test_track.issue.id')"
|
:label="$t('test_track.issue.id')"
|
||||||
prop="id"
|
prop="id"
|
||||||
v-if="false"
|
v-if="false"
|
||||||
>
|
>
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
<ms-table-column :label="$t('test_track.issue.id')" prop="num">
|
<ms-table-column
|
||||||
|
:field="item"
|
||||||
|
:label="'ID'"
|
||||||
|
prop="num"
|
||||||
|
:sortable="true">
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
|
|
||||||
<ms-table-column
|
<ms-table-column
|
||||||
|
:field="item"
|
||||||
:label="$t('test_track.issue.title')"
|
:label="$t('test_track.issue.title')"
|
||||||
prop="title"
|
prop="title"
|
||||||
min-width="200px"
|
:sortable="true"
|
||||||
>
|
>
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
|
|
||||||
|
<!-- 自定义状态字段 -->
|
||||||
|
<span v-for="field in issueTemplate.customFields" :key="field.id">
|
||||||
<ms-table-column
|
<ms-table-column
|
||||||
|
:field="item"
|
||||||
|
:label="field.name"
|
||||||
|
:prop="field.name"
|
||||||
|
v-if="field.name === '状态'"
|
||||||
|
>
|
||||||
|
<template v-slot="scope">
|
||||||
|
<span>
|
||||||
|
{{ getCustomFieldValue(scope.row, field) ? getCustomFieldValue(scope.row, field) : issueStatusMap[scope.row.status]}}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</ms-table-column>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<ms-table-column
|
||||||
|
:field="item"
|
||||||
:label="$t('test_track.issue.platform_status')"
|
:label="$t('test_track.issue.platform_status')"
|
||||||
v-if="isThirdPart"
|
v-if="isThirdPart"
|
||||||
prop="platformStatus"
|
prop="platformStatus"
|
||||||
|
@ -70,7 +94,7 @@
|
||||||
{{ scope.row.platformStatus ? tapdIssueStatusMap[scope.row.platformStatus] : '--' }}
|
{{ scope.row.platformStatus ? tapdIssueStatusMap[scope.row.platformStatus] : '--' }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else-if="scope.row.platform ==='Local'">
|
<span v-else-if="scope.row.platform ==='Local'">
|
||||||
{{ scope.row.platformStatus ? tapdIssueStatusMap[scope.row.platformStatus] : '--' }}
|
{{ '--' }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else-if="platformStatusMap && platformStatusMap.get(scope.row.platformStatus)">
|
<span v-else-if="platformStatusMap && platformStatusMap.get(scope.row.platformStatus)">
|
||||||
{{ platformStatusMap.get(scope.row.platformStatus) }}
|
{{ platformStatusMap.get(scope.row.platformStatus) }}
|
||||||
|
@ -82,26 +106,22 @@
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
|
|
||||||
<ms-table-column
|
<ms-table-column
|
||||||
v-else
|
:field="item"
|
||||||
:label="$t('test_track.issue.status')"
|
|
||||||
prop="status"
|
|
||||||
>
|
|
||||||
<template v-slot="scope">
|
|
||||||
<span>{{
|
|
||||||
issueStatusMap[scope.row.status]
|
|
||||||
? issueStatusMap[scope.row.status]
|
|
||||||
: scope.row.status
|
|
||||||
}}</span>
|
|
||||||
</template>
|
|
||||||
</ms-table-column>
|
|
||||||
|
|
||||||
<ms-table-column
|
|
||||||
:label="$t('test_track.issue.platform')"
|
:label="$t('test_track.issue.platform')"
|
||||||
prop="platform"
|
prop="platform"
|
||||||
>
|
>
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
|
|
||||||
<issue-description-table-item />
|
<ms-table-column
|
||||||
|
:field="item"
|
||||||
|
:label="$t('test_track.review.creator')"
|
||||||
|
prop="creatorName"
|
||||||
|
>
|
||||||
|
</ms-table-column>
|
||||||
|
|
||||||
|
<issue-description-table-item :field="item" />
|
||||||
|
</span>
|
||||||
|
|
||||||
</ms-table>
|
</ms-table>
|
||||||
|
|
||||||
<!-- <ms-table-pagination
|
<!-- <ms-table-pagination
|
||||||
|
@ -137,12 +157,14 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
|
import { LOCAL } from "metersphere-frontend/src/utils/constants";
|
||||||
import MsNewUiSearch from "metersphere-frontend/src/components/new-ui/MsSearch";
|
import MsNewUiSearch from "metersphere-frontend/src/components/new-ui/MsSearch";
|
||||||
import MsEditDialog from "metersphere-frontend/src/components/MsEditDialog";
|
import MsEditDialog from "metersphere-frontend/src/components/MsEditDialog";
|
||||||
import HomePagination from "@/business/home/components/pagination/HomePagination";
|
import HomePagination from "@/business/home/components/pagination/HomePagination";
|
||||||
import MsTable from "metersphere-frontend/src/components/new-ui/MsTable";
|
import MsTable from "metersphere-frontend/src/components/new-ui/MsTable";
|
||||||
import MsTableColumn from "metersphere-frontend/src/components/table/MsTableColumn";
|
import MsTableColumn from "metersphere-frontend/src/components/table/MsTableColumn";
|
||||||
import {
|
import {
|
||||||
|
getIssuePartTemplateWithProject,
|
||||||
getPlatformOption, getPlatformStatus,
|
getPlatformOption, getPlatformStatus,
|
||||||
getRelateIssues,
|
getRelateIssues,
|
||||||
isThirdPartEnable,
|
isThirdPartEnable,
|
||||||
|
@ -158,6 +180,7 @@ import MsSearch from "metersphere-frontend/src/components/search/MsSearch";
|
||||||
import MsDrawerComponent from "../common/MsDrawerComponent";
|
import MsDrawerComponent from "../common/MsDrawerComponent";
|
||||||
import MsTableAdvSearch from "metersphere-frontend/src/components/new-ui/MsTableAdvSearch";
|
import MsTableAdvSearch from "metersphere-frontend/src/components/new-ui/MsTableAdvSearch";
|
||||||
import {setIssuePlatformComponent} from "@/business/issue/issue";
|
import {setIssuePlatformComponent} from "@/business/issue/issue";
|
||||||
|
import {getCustomFieldValue, getTableHeaderWithCustomFields} from "metersphere-frontend/src/utils/tableUtils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "CaseIssueRelateList",
|
name: "CaseIssueRelateList",
|
||||||
|
@ -179,6 +202,8 @@ export default {
|
||||||
components: TEST_CASE_RELEVANCE_ISSUE_LIST,
|
components: TEST_CASE_RELEVANCE_ISSUE_LIST,
|
||||||
}),
|
}),
|
||||||
visible: false,
|
visible: false,
|
||||||
|
issueTemplate: {},
|
||||||
|
fields: [],
|
||||||
isThirdPart: false,
|
isThirdPart: false,
|
||||||
selectCounts: null,
|
selectCounts: null,
|
||||||
screenHeight: 'calc(100vh - 185px)',
|
screenHeight: 'calc(100vh - 185px)',
|
||||||
|
@ -203,11 +228,35 @@ export default {
|
||||||
notInIds: Array,
|
notInIds: Array,
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
isThirdPartEnable((data) => {
|
this.getIssueTemplate();
|
||||||
this.isThirdPart = data;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getIssueTemplate() {
|
||||||
|
getIssuePartTemplateWithProject((template, project) => {
|
||||||
|
this.currentProject = project;
|
||||||
|
this.issueTemplate = template;
|
||||||
|
if (this.issueTemplate.platform === LOCAL) {
|
||||||
|
this.isThirdPart = false;
|
||||||
|
} else {
|
||||||
|
this.isThirdPart = true;
|
||||||
|
}
|
||||||
|
this.fields = getTableHeaderWithCustomFields("ISSUE_LIST", this.issueTemplate.customFields);
|
||||||
|
if (!this.isThirdPart) {
|
||||||
|
for (let i = 0; i < this.fields.length; i++) {
|
||||||
|
if (this.fields[i].id === "platformStatus") {
|
||||||
|
this.fields.splice(i, 1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.$refs.table) {
|
||||||
|
this.$refs.table.reloadTable();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getCustomFieldValue(row, field) {
|
||||||
|
return getCustomFieldValue(row, field, this.members);
|
||||||
|
},
|
||||||
clearSelection() {
|
clearSelection() {
|
||||||
if (this.$refs.table) {
|
if (this.$refs.table) {
|
||||||
this.$refs.table.clearSelectRows();
|
this.$refs.table.clearSelectRows();
|
||||||
|
@ -217,6 +266,7 @@ export default {
|
||||||
this.$refs.relevanceDialog.selectCounts = data;
|
this.$refs.relevanceDialog.selectCounts = data;
|
||||||
},
|
},
|
||||||
open() {
|
open() {
|
||||||
|
this.getIssueTemplate();
|
||||||
this.getIssues();
|
this.getIssues();
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
this.$refs.relevanceDialog.open();
|
this.$refs.relevanceDialog.open();
|
||||||
|
|
|
@ -146,7 +146,6 @@
|
||||||
<ms-single-tag v-for="(itemName,index) in scope.row.tags" :key="index" type="success" effect="plain"
|
<ms-single-tag v-for="(itemName,index) in scope.row.tags" :key="index" type="success" effect="plain"
|
||||||
:show-tooltip="scope.row.tags.length === 1 && itemName.length * 12 <= 80"
|
:show-tooltip="scope.row.tags.length === 1 && itemName.length * 12 <= 80"
|
||||||
:content="itemName" style="margin-left: 0px; margin-right: 2px"/>
|
:content="itemName" style="margin-left: 0px; margin-right: 2px"/>
|
||||||
<span/>
|
|
||||||
</template>
|
</template>
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue