Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
9f1198fe9e
|
@ -98,8 +98,8 @@
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="getTestCaseByNotInReview" resultType="io.metersphere.base.domain.TestCase">
|
<select id="getTestCaseByNotInReview" resultType="io.metersphere.base.domain.TestCase">
|
||||||
select test_case.id, test_case.name, test_case.priority, test_case.type, test_case.review_status
|
select test_case.id, test_case.name, test_case.priority, test_case.type, test_case.review_status from test_case as test_case
|
||||||
from test_case
|
left join test_case_review_test_case as T2 on test_case.id=T2.case_id
|
||||||
<where>
|
<where>
|
||||||
<if test="request.combine != null">
|
<if test="request.combine != null">
|
||||||
<include refid="combine">
|
<include refid="combine">
|
||||||
|
@ -107,7 +107,7 @@
|
||||||
<property name="name" value="request.name"/>
|
<property name="name" value="request.name"/>
|
||||||
</include>
|
</include>
|
||||||
</if>
|
</if>
|
||||||
and test_case.id not in (select case_id from test_case_review_test_case where review_id =#{request.reviewId})
|
and T2.case_id is null
|
||||||
<if test="request.name != null">
|
<if test="request.name != null">
|
||||||
and test_case.name like CONCAT('%', #{request.name},'%')
|
and test_case.name like CONCAT('%', #{request.name},'%')
|
||||||
</if>
|
</if>
|
||||||
|
@ -152,8 +152,8 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getTestCaseByNotInPlan" resultType="io.metersphere.base.domain.TestCase">
|
<select id="getTestCaseByNotInPlan" resultType="io.metersphere.base.domain.TestCase">
|
||||||
select test_case.id, test_case.name, test_case.priority, test_case.type, test_case.review_status
|
select test_case.id, test_case.name, test_case.priority, test_case.type, test_case.review_status from test_case as test_case
|
||||||
from test_case
|
left join test_plan_test_case as T2 on test_case.id=T2.case_id
|
||||||
<where>
|
<where>
|
||||||
<if test="request.combine != null">
|
<if test="request.combine != null">
|
||||||
<include refid="combine">
|
<include refid="combine">
|
||||||
|
@ -161,7 +161,7 @@
|
||||||
<property name="name" value="request.name"/>
|
<property name="name" value="request.name"/>
|
||||||
</include>
|
</include>
|
||||||
</if>
|
</if>
|
||||||
and test_case.id not in (select case_id from test_plan_test_case where plan_id =#{request.planId})
|
and T2.case_id is null
|
||||||
<if test="request.name != null">
|
<if test="request.name != null">
|
||||||
and test_case.name like CONCAT('%', #{request.name},'%')
|
and test_case.name like CONCAT('%', #{request.name},'%')
|
||||||
</if>
|
</if>
|
||||||
|
|
|
@ -9,7 +9,18 @@ import java.util.List;
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class PlanCaseRelevanceRequest {
|
public class PlanCaseRelevanceRequest {
|
||||||
|
/**
|
||||||
|
* 测试计划ID
|
||||||
|
*/
|
||||||
private String planId;
|
private String planId;
|
||||||
private String projectId;
|
|
||||||
|
/**
|
||||||
|
* 当选择关联全部用例时把加载条件送到后台,从后台查询
|
||||||
|
*/
|
||||||
|
private QueryTestCaseRequest request;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 具体要关联的用例
|
||||||
|
*/
|
||||||
private List<String> testCaseIds = new ArrayList<>();
|
private List<String> testCaseIds = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package io.metersphere.track.request.testreview;
|
package io.metersphere.track.request.testreview;
|
||||||
|
|
||||||
|
import io.metersphere.track.request.testcase.QueryTestCaseRequest;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@ -9,7 +10,18 @@ import java.util.List;
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class ReviewRelevanceRequest {
|
public class ReviewRelevanceRequest {
|
||||||
|
/**
|
||||||
|
* 评审ID
|
||||||
|
*/
|
||||||
private String reviewId;
|
private String reviewId;
|
||||||
private String projectId;
|
|
||||||
|
/**
|
||||||
|
* 当选择关联全部用例时把加载条件送到后台,从后台查询
|
||||||
|
*/
|
||||||
|
|
||||||
|
private QueryTestCaseRequest request;
|
||||||
|
/**
|
||||||
|
* 具体选择要关联的用例
|
||||||
|
*/
|
||||||
private List<String> testCaseIds = new ArrayList<>();
|
private List<String> testCaseIds = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
|
@ -326,12 +326,9 @@ public class TestCaseReviewService {
|
||||||
if (testCaseIds.isEmpty()) {
|
if (testCaseIds.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 如果是关联全部指令则从新查询未关联的案例
|
// 如果是关联全部指令则根据条件查询未关联的案例
|
||||||
if (testCaseIds.get(0).equals("all")) {
|
if (testCaseIds.get(0).equals("all")) {
|
||||||
QueryTestCaseRequest req = new QueryTestCaseRequest();
|
List<TestCase> testCases = extTestCaseMapper.getTestCaseByNotInReview(request.getRequest());
|
||||||
req.setReviewId(request.getReviewId());
|
|
||||||
req.setProjectId(request.getProjectId());
|
|
||||||
List<TestCase> testCases = extTestCaseMapper.getTestCaseByNotInReview(req);
|
|
||||||
if (!testCases.isEmpty()) {
|
if (!testCases.isEmpty()) {
|
||||||
testCaseIds = testCases.stream().map(testCase -> testCase.getId()).collect(Collectors.toList());
|
testCaseIds = testCases.stream().map(testCase -> testCase.getId()).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
|
@ -211,12 +211,9 @@ public class TestPlanService {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果是关联全部指令则从新查询未关联的案例
|
// 如果是关联全部指令则根据条件查询未关联的案例
|
||||||
if (testCaseIds.get(0).equals("all")) {
|
if (testCaseIds.get(0).equals("all")) {
|
||||||
QueryTestCaseRequest req = new QueryTestCaseRequest();
|
List<TestCase> testCases = extTestCaseMapper.getTestCaseByNotInPlan(request.getRequest());
|
||||||
req.setPlanId(request.getPlanId());
|
|
||||||
req.setProjectId(request.getProjectId());
|
|
||||||
List<TestCase> testCases = extTestCaseMapper.getTestCaseByNotInPlan(req);
|
|
||||||
if (!testCases.isEmpty()) {
|
if (!testCases.isEmpty()) {
|
||||||
testCaseIds = testCases.stream().map(testCase -> testCase.getId()).collect(Collectors.toList());
|
testCaseIds = testCases.stream().map(testCase -> testCase.getId()).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,17 +116,13 @@
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
validateDomain(domain) {
|
validateDomain(domain) {
|
||||||
let url = {};
|
let strRegex = "^(?=^.{3,255}$)(http(s)?:\\/\\/)?(www\\.)?[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+(:\\d+)*(\\/\\w+\\.\\w+)*$";
|
||||||
try {
|
const re = new RegExp(strRegex);
|
||||||
if (!domain.startsWith("http") || !domain.startsWith("https")) {
|
if (re.test(domain) && domain.length < 26) {
|
||||||
domain += "http://";
|
return true;
|
||||||
}
|
|
||||||
url = new URL(domain);
|
|
||||||
} catch (e) {
|
|
||||||
this.$warning(this.$t('load_test.input_domain'));
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
return true;
|
this.$warning(this.$t('load_test.input_domain'));
|
||||||
|
return false;
|
||||||
},
|
},
|
||||||
dblHostTable: function (row) {
|
dblHostTable: function (row) {
|
||||||
row.status = 'edit';
|
row.status = 'edit';
|
||||||
|
|
|
@ -46,7 +46,10 @@
|
||||||
handleRemove(file) {
|
handleRemove(file) {
|
||||||
this.$refs.upload.handleRemove(file);
|
this.$refs.upload.handleRemove(file);
|
||||||
for (let i = 0; i < this.parameter.files.length; i++) {
|
for (let i = 0; i < this.parameter.files.length; i++) {
|
||||||
if (file.file.name === this.parameter.files[i].file.name) {
|
let fileName = file.file ? file.file.name : file.name;
|
||||||
|
let paramFileName = this.parameter.files[i].file ?
|
||||||
|
this.parameter.files[i].file.name : this.parameter.files[i].name;
|
||||||
|
if (fileName === paramFileName) {
|
||||||
this.parameter.files.splice(i, 1);
|
this.parameter.files.splice(i, 1);
|
||||||
this.$refs.upload.handleRemove(file);
|
this.$refs.upload.handleRemove(file);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -176,7 +176,7 @@
|
||||||
let param = {};
|
let param = {};
|
||||||
param.planId = this.planId;
|
param.planId = this.planId;
|
||||||
param.testCaseIds = [...this.selectIds];
|
param.testCaseIds = [...this.selectIds];
|
||||||
param.projectId = this.projectId;
|
param.request = this.condition;
|
||||||
// 选择全选则全部加入到评审,无论是否加载完全部
|
// 选择全选则全部加入到评审,无论是否加载完全部
|
||||||
if (this.testCases.length === param.testCaseIds.length) {
|
if (this.testCases.length === param.testCaseIds.length) {
|
||||||
param.testCaseIds = ['all'];
|
param.testCaseIds = ['all'];
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<ms-table-header :is-tester-permission="true" :condition.sync="condition" @search="initTableData"
|
<ms-table-header :is-tester-permission="true" :condition.sync="condition" @search="initTableData"
|
||||||
:show-create="false" :tip="$t('commons.search_by_name_or_id')">
|
:show-create="false" :tip="$t('commons.search_by_name_or_id')">
|
||||||
<template v-slot:title>
|
<template v-slot:title>
|
||||||
<node-breadcrumb class="table-title" :nodes="selectParentNodes" @refresh="refresh"/>
|
<node-breadcrumb class="table-title" :nodes="selectParentNodes" @refresh="breadcrumbRefresh"/>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:button>
|
<template v-slot:button>
|
||||||
<ms-table-button :is-tester-permission="true" v-if="!showMyTestCase" icon="el-icon-s-custom"
|
<ms-table-button :is-tester-permission="true" v-if="!showMyTestCase" icon="el-icon-s-custom"
|
||||||
|
@ -392,6 +392,10 @@ export default {
|
||||||
this.selectRows.clear();
|
this.selectRows.clear();
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
},
|
},
|
||||||
|
breadcrumbRefresh() {
|
||||||
|
this.showMyTestCase = false;
|
||||||
|
this.refresh();
|
||||||
|
},
|
||||||
refreshTableAndPlan() {
|
refreshTableAndPlan() {
|
||||||
this.getTestPlanById();
|
this.getTestPlanById();
|
||||||
this.initTableData();
|
this.initTableData();
|
||||||
|
|
|
@ -185,7 +185,7 @@
|
||||||
let param = {};
|
let param = {};
|
||||||
param.reviewId = this.reviewId;
|
param.reviewId = this.reviewId;
|
||||||
param.testCaseIds = [...this.selectIds];
|
param.testCaseIds = [...this.selectIds];
|
||||||
param.projectId = this.projectId;
|
param.request = this.condition;
|
||||||
// 选择全选则全部加入到评审,无论是否加载完全部
|
// 选择全选则全部加入到评审,无论是否加载完全部
|
||||||
if (this.testReviews.length === param.testCaseIds.length) {
|
if (this.testReviews.length === param.testCaseIds.length) {
|
||||||
param.testCaseIds = ['all'];
|
param.testCaseIds = ['all'];
|
||||||
|
|
Loading…
Reference in New Issue