fix(测试跟踪): 测试计划关联功能用例添加评审结果列

This commit is contained in:
song-cc-rock 2023-10-11 17:29:53 +08:00 committed by 刘瑞斌
parent 4cb5139fdc
commit 0bf50b30df
3 changed files with 37 additions and 3 deletions

View File

@ -113,6 +113,12 @@
<property name="object" value="${condition}.executor"/> <property name="object" value="${condition}.executor"/>
</include> </include>
</if> </if>
<if test="${condition}.reviewStatus != null">
and test_case.review_status
<include refid="condition">
<property name="object" value="${condition}.reviewStatus"/>
</include>
</if>
<if test='${condition}.tags != null and ${objectKey}.value.size() > 0 and ${objectKey}.operator == "not like"'> <if test='${condition}.tags != null and ${objectKey}.value.size() > 0 and ${objectKey}.operator == "not like"'>
and ( test_case.tags is null or and ( test_case.tags is null or
<foreach collection="${objectKey}.value" item="tag" separator="and" open="(" close=")"> <foreach collection="${objectKey}.value" item="tag" separator="and" open="(" close=")">
@ -273,6 +279,10 @@
#{value} #{value}
</foreach> </foreach>
</when> </when>
<when test="key=='review_status'">
and test_case.review_status in
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.filterInWrapper"/>
</when>
<when test="key=='version_id'"> <when test="key=='version_id'">
and test_case.version_id in and test_case.version_id in
<foreach collection="values" item="value" separator="," open="(" close=")"> <foreach collection="values" item="value" separator="," open="(" close=")">

View File

@ -198,7 +198,7 @@
<span class="el-dropdown-link"> <span class="el-dropdown-link">
<status-table-item :value="scope.row.status"/> <status-table-item :value="scope.row.status"/>
</span> </span>
<el-dropdown-menu slot="dropdown" chang> <el-dropdown-menu slot="dropdown">
<el-dropdown-item :disabled="!hasEditPermission" <el-dropdown-item :disabled="!hasEditPermission"
:command="{id: scope.row.id, caseId: scope.row.caseId, status: 'Pass'}"> :command="{id: scope.row.id, caseId: scope.row.caseId, status: 'Pass'}">
{{ $t('test_track.plan_view.pass') }} {{ $t('test_track.plan_view.pass') }}
@ -221,6 +221,20 @@
</template> </template>
</ms-table-column> </ms-table-column>
<ms-table-column
prop="reviewStatus"
:field="item"
:filters="reviewStatusFilters"
min-width="140px"
:fields-width="fieldsWidth"
:label="$t('test_track.case.status')">
<template v-slot:default="scope">
<span class="el-dropdown-link">
<review-status :value="scope.row.reviewStatus"/>
</span>
</template>
</ms-table-column>
<ms-table-column <ms-table-column
sortable="custom" sortable="custom"
prop="updateTime" prop="updateTime"
@ -341,10 +355,12 @@ import {
testPlanTestCaseEdit testPlanTestCaseEdit
} from "@/api/remote/plan/test-plan-test-case"; } from "@/api/remote/plan/test-plan-test-case";
import {getOriginIssuesByCaseId} from "@/api/issue"; import {getOriginIssuesByCaseId} from "@/api/issue";
import ReviewStatus from "@/business/case/components/ReviewStatus.vue";
export default { export default {
name: "FunctionalTestCaseList", name: "FunctionalTestCaseList",
components: { components: {
ReviewStatus,
TestPlanCaseIssueItem, TestPlanCaseIssueItem,
MsTableColumn, MsTableColumn,
MsTable, MsTable,
@ -404,6 +420,13 @@ export default {
{text: this.$t('test_track.plan_view.skip'), value: 'Skip'} {text: this.$t('test_track.plan_view.skip'), value: 'Skip'}
], ],
userFilters: [], userFilters: [],
reviewStatusFilters: [
{text: this.$t('test_track.review.prepare'), value: 'Prepare'},
{text: this.$t('test_track.review.again'), value: 'Again'},
{text: this.$t('test_track.review.pass'), value: 'Pass'},
{text: this.$t('test_track.review.un_pass'), value: 'UnPass'},
{text: this.$t('test_track.review.underway'), value: 'Underway'}
],
showMore: false, showMore: false,
typeArr: [ typeArr: [
{id: 'status', name: this.$t('test_track.plan_view.execute_result')}, {id: 'status', name: this.$t('test_track.plan_view.execute_result')},

View File

@ -14,8 +14,9 @@ const TRACK_HEADER = {
{id: 'executor', key: '7', label: 'test_track.plan_view.executor'}, {id: 'executor', key: '7', label: 'test_track.plan_view.executor'},
{id: 'maintainerName', key: 'c', label: 'test_track.plan.plan_principal'}, {id: 'maintainerName', key: 'c', label: 'test_track.plan.plan_principal'},
{id: 'status', key: '8', label: 'test_track.plan_view.execute_result'}, {id: 'status', key: '8', label: 'test_track.plan_view.execute_result'},
{id: 'updateTime', key: '9', label: 'commons.update_time'}, {id: 'reviewStatus', key: '9', label: 'test_track.review_view.execute_result'},
{id: 'createTime', key: 'a', label: 'commons.create_time'}, {id: 'updateTime', key: 'a', label: 'commons.update_time'},
{id: 'createTime', key: 'e', label: 'commons.create_time'},
], ],
//测试计划 //测试计划
TEST_PLAN_LIST: [ TEST_PLAN_LIST: [