fix(测试跟踪): 自动重新提审对已经有人评审但状态是评审中的用例不生效
--bug=1023006 --user=陈建星 【测试跟踪】用例评审-开启重新提审-多人评审,修改用例后状态没有变成重新提审 https://www.tapd.cn/55049933/s/1335271
This commit is contained in:
parent
928e3701e8
commit
c9d467c607
|
@ -12,5 +12,6 @@ public interface ExtTestCaseCommentMapper {
|
|||
* @param caseId
|
||||
* @return
|
||||
*/
|
||||
List<TestCaseCommentDTO> getCaseComments(@Param("caseId") String caseId, @Param("type") String type, @Param("belongId") String belongId);
|
||||
List<TestCaseCommentDTO> getCaseComments(@Param("caseId") String caseId, @Param("type") String type,
|
||||
@Param("belongId") String belongId, @Param("withStatus") boolean withStatus);
|
||||
}
|
||||
|
|
|
@ -12,6 +12,9 @@
|
|||
<if test="belongId != null and belongId != ''">
|
||||
and test_case_comment.belong_id = #{belongId}
|
||||
</if>
|
||||
<if test="withStatus">
|
||||
and test_case_comment.status is not null
|
||||
</if>
|
||||
order by test_case_comment.create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -23,6 +23,6 @@
|
|||
<select id="selectForReReview" resultType="io.metersphere.base.domain.TestCaseReviewTestCase">
|
||||
select id, case_id, status, review_id
|
||||
from test_case_review_test_case
|
||||
where case_id = #{caseId} and (status = 'Pass' or status = 'UnPass');
|
||||
where case_id = #{caseId} and (status = 'Pass' or status = 'UnPass' or status = 'Underway');
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -85,7 +85,7 @@ public class TestCaseCommentService {
|
|||
}
|
||||
|
||||
public List<TestCaseCommentDTO> getCaseComments(String caseId, String type) {
|
||||
return filterMarkComments(extTestCaseCommentMapper.getCaseComments(caseId, type, null));
|
||||
return filterMarkComments(extTestCaseCommentMapper.getCaseComments(caseId, type, null, false));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -100,7 +100,11 @@ public class TestCaseCommentService {
|
|||
}
|
||||
|
||||
public List<TestCaseCommentDTO> getCaseComments(String caseId, String type, String belongId) {
|
||||
return filterMarkComments(extTestCaseCommentMapper.getCaseComments(caseId, type, belongId));
|
||||
return filterMarkComments(extTestCaseCommentMapper.getCaseComments(caseId, type, belongId, false));
|
||||
}
|
||||
|
||||
public List<TestCaseCommentDTO> getStatusCaseComments(String caseId, String type, String belongId) {
|
||||
return filterMarkComments(extTestCaseCommentMapper.getCaseComments(caseId, type, belongId, true));
|
||||
}
|
||||
|
||||
public List<TestCaseCommentDTO> getCaseComments(String caseId) {
|
||||
|
|
|
@ -205,7 +205,7 @@ public class TestReviewTestCaseService {
|
|||
|
||||
public String updateReviewCaseStatusForEdit(TestCaseReviewTestCaseEditRequest testCaseReviewTestCase, String reviewPassRule) {
|
||||
List<TestCaseCommentDTO> comments =
|
||||
testCaseCommentService.getCaseComments(testCaseReviewTestCase.getCaseId(), TestCaseCommentType.REVIEW.name(), testCaseReviewTestCase.getReviewId());
|
||||
testCaseCommentService.getStatusCaseComments(testCaseReviewTestCase.getCaseId(), TestCaseCommentType.REVIEW.name(), testCaseReviewTestCase.getReviewId());
|
||||
|
||||
comments = filterAgainComments(comments);
|
||||
|
||||
|
@ -228,7 +228,7 @@ public class TestReviewTestCaseService {
|
|||
TestCaseReviewTestCase testCaseReviewTestCase = testCaseReviewTestCaseMapper.selectByPrimaryKey(id);
|
||||
|
||||
List<TestCaseCommentDTO> comments =
|
||||
testCaseCommentService.getCaseComments(testCaseReviewTestCase.getCaseId(), TestCaseCommentType.REVIEW.name(), testCaseReviewTestCase.getReviewId());
|
||||
testCaseCommentService.getStatusCaseComments(testCaseReviewTestCase.getCaseId(), TestCaseCommentType.REVIEW.name(), testCaseReviewTestCase.getReviewId());
|
||||
|
||||
String reviewPassRule = testCaseReviewService.getTestReview(testCaseReviewTestCase.getReviewId())
|
||||
.getReviewPassRule();
|
||||
|
@ -675,7 +675,7 @@ public class TestReviewTestCaseService {
|
|||
|
||||
public void updateReviewCaseStatusForRuleChange(String originPassRule, TestCaseReviewTestCase reviewTestCase, String reviewPassRule) {
|
||||
List<TestCaseCommentDTO> comments =
|
||||
testCaseCommentService.getCaseComments(reviewTestCase.getCaseId(), TestCaseCommentType.REVIEW.name(), reviewTestCase.getReviewId());
|
||||
testCaseCommentService.getStatusCaseComments(reviewTestCase.getCaseId(), TestCaseCommentType.REVIEW.name(), reviewTestCase.getReviewId());
|
||||
|
||||
comments = filterAgainComments(comments);
|
||||
|
||||
|
@ -702,7 +702,7 @@ public class TestReviewTestCaseService {
|
|||
*/
|
||||
public void reCalcReviewCaseStatus(String reviewPassRule, TestCaseReviewTestCase reviewTestCase) {
|
||||
List<TestCaseCommentDTO> comments =
|
||||
testCaseCommentService.getCaseComments(reviewTestCase.getCaseId(), TestCaseCommentType.REVIEW.name(), reviewTestCase.getReviewId());
|
||||
testCaseCommentService.getStatusCaseComments(reviewTestCase.getCaseId(), TestCaseCommentType.REVIEW.name(), reviewTestCase.getReviewId());
|
||||
|
||||
comments = filterAgainComments(comments);
|
||||
|
||||
|
@ -720,13 +720,20 @@ public class TestReviewTestCaseService {
|
|||
public void reReviewByCaseId(String caseId) {
|
||||
List<TestCaseReviewTestCase> reviewTestCases = extTestCaseReviewTestCaseMapper.selectForReReview(caseId);
|
||||
for (TestCaseReviewTestCase reviewTestCase : reviewTestCases) {
|
||||
updateTestReviewTestCaseStatus(reviewTestCase, TestCaseReviewCommentStatus.Again.name());
|
||||
// 添加一条重新提审的评论
|
||||
TestCaseReviewTestCaseEditRequest addCommentRequest = new TestCaseReviewTestCaseEditRequest();
|
||||
BeanUtils.copyBean(addCommentRequest, reviewTestCase);
|
||||
addCommentRequest.setStatus(TestCaseReviewCommentStatus.Again.name());
|
||||
addCommentRequest.setComment(StringUtils.EMPTY);
|
||||
testCaseCommentService.saveReviewCommentWithoutNotification(addCommentRequest);
|
||||
List<TestCaseCommentDTO> comments =
|
||||
testCaseCommentService.getStatusCaseComments(reviewTestCase.getCaseId(), TestCaseCommentType.REVIEW.name(), reviewTestCase.getReviewId());
|
||||
|
||||
comments = filterAgainComments(comments);
|
||||
|
||||
if (CollectionUtils.isNotEmpty(comments)) {
|
||||
updateTestReviewTestCaseStatus(reviewTestCase, TestCaseReviewCommentStatus.Again.name());
|
||||
// 添加一条重新提审的评论
|
||||
TestCaseReviewTestCaseEditRequest addCommentRequest = new TestCaseReviewTestCaseEditRequest();
|
||||
BeanUtils.copyBean(addCommentRequest, reviewTestCase);
|
||||
addCommentRequest.setStatus(TestCaseReviewCommentStatus.Again.name());
|
||||
addCommentRequest.setComment(StringUtils.EMPTY);
|
||||
testCaseCommentService.saveReviewCommentWithoutNotification(addCommentRequest);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1400,6 +1400,9 @@ export default {
|
|||
this.currentVersionName = this.findVersionNameByID(this.form.versionId)
|
||||
},
|
||||
async getVersionOptionList() {
|
||||
if (!hasLicense()) {
|
||||
return;
|
||||
}
|
||||
let res = await getProjectVersions(getCurrentProjectID());
|
||||
this.versionOptions = res.data ?? [];
|
||||
},
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<div class="case-main-layout-left" style="float: left; display: inline-block">
|
||||
<!-- 表头统计内容 -->
|
||||
<ms-table-count-bar :count-content="$t('table.all_case_content') + ' (' + page.total + ')'"></ms-table-count-bar>
|
||||
<ms-table-count-bar :count-content="$t('case.all_case_content') + ' (' + page.total + ')'"></ms-table-count-bar>
|
||||
</div>
|
||||
|
||||
<div class="case-main-layout-right" style="float: right; display: flex">
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<div class="case-main-layout">
|
||||
<div class="case-main-layout-left" style="float: left; display: inline-block">
|
||||
<ms-table-count-bar :count-content="$t('table.all_case_content') + ' (' + page.total + ')'"></ms-table-count-bar>
|
||||
<ms-table-count-bar :count-content="$t('case.all_case_content') + ' (' + page.total + ')'"></ms-table-count-bar>
|
||||
</div>
|
||||
|
||||
<div class="case-main-layout-right" style="float: right; display: flex">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div>
|
||||
<div class="case-main-layout-left" style="display: inline-block">
|
||||
<ms-table-count-bar :count-content="$t('table.all_case_content') + '(' + caseNum + ')'"></ms-table-count-bar>
|
||||
<ms-table-count-bar :count-content="$t('case.all_case_content') + '(' + caseNum + ')'"></ms-table-count-bar>
|
||||
</div>
|
||||
|
||||
<div class="case-main-layout-right" style="float: right; display: flex">
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<ms-table-column
|
||||
:prop="prop"
|
||||
:field="field"
|
||||
:filters="reviewStatusFilters"
|
||||
:filters="filters"
|
||||
:min-width="minWidth"
|
||||
:fields-width="fieldsWidth"
|
||||
:label="$t('test_track.case.status')">
|
||||
|
@ -34,16 +34,17 @@ export default {
|
|||
type: Object,
|
||||
default: null
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
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'},
|
||||
]
|
||||
filters: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [
|
||||
{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'},
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -203,11 +203,11 @@ export default {
|
|||
<style scoped>
|
||||
|
||||
:deep(.ms-main-container) {
|
||||
height: calc(100vh - 80px - 53px);
|
||||
height: calc(100vh - 93px);
|
||||
}
|
||||
|
||||
:deep(.ms-aside-container ){
|
||||
height: calc(100vh - 80px - 53px) !important;
|
||||
height: calc(100vh - 93px) !important;
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
|
|
|
@ -123,6 +123,7 @@
|
|||
min-width="120px"/>
|
||||
|
||||
<test-case-review-status-table-item
|
||||
:filters="statusFilters"
|
||||
:field="item"
|
||||
:fields-width="fieldsWidth"/>
|
||||
|
||||
|
@ -259,6 +260,12 @@ export default {
|
|||
{text: 'P2', value: 'P2'},
|
||||
{text: 'P3', value: 'P3'}
|
||||
],
|
||||
statusFilters: [
|
||||
{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'},
|
||||
],
|
||||
methodFilters: [
|
||||
{text: this.$t('test_track.case.manual'), value: 'manual'},
|
||||
{text: this.$t('test_track.case.auto'), value: 'auto'}
|
||||
|
|
|
@ -65,9 +65,6 @@ const message = {
|
|||
plan: {
|
||||
batch_delete_tip: "Do you want to continue deleting the test plan?",
|
||||
},
|
||||
table: {
|
||||
all_case_content: "All case"
|
||||
},
|
||||
review: {
|
||||
result_distribution: "Result Distribution",
|
||||
review_pass_rule: 'Review Pass Criteria',
|
||||
|
@ -84,6 +81,7 @@ const message = {
|
|||
pass_review_confirm: "Are you sure to pass this review",
|
||||
},
|
||||
case: {
|
||||
all_case_content: "All case",
|
||||
use_case_detail: "Use Case Details",
|
||||
associate_test_cases: "Associate Test Cases",
|
||||
dependencies: "Dependence",
|
||||
|
|
|
@ -65,9 +65,6 @@ const message = {
|
|||
plan: {
|
||||
batch_delete_tip: "批量删除测试计划,是否继续?",
|
||||
},
|
||||
table: {
|
||||
all_case_content: "全部用例",
|
||||
},
|
||||
review: {
|
||||
result_distribution: "结果分布",
|
||||
review_pass_rule: "评审通过标准",
|
||||
|
@ -84,6 +81,7 @@ const message = {
|
|||
pass_review_confirm: "确定通过此评审吗",
|
||||
},
|
||||
case: {
|
||||
all_case_content: "全部用例",
|
||||
use_case_detail: "用例详情",
|
||||
associate_test_cases: "关联测试用例",
|
||||
dependencies: "依赖关系",
|
||||
|
|
|
@ -65,9 +65,6 @@ const message = {
|
|||
plan: {
|
||||
batch_delete_tip: "批量刪除測試計劃,是否繼續?",
|
||||
},
|
||||
table: {
|
||||
all_case_content: "全部用例"
|
||||
},
|
||||
review: {
|
||||
result_distribution: "結果分布",
|
||||
review_pass_rule: '評審通過標準',
|
||||
|
@ -84,6 +81,7 @@ const message = {
|
|||
pass_review_confirm: "確定通過此評審嗎",
|
||||
},
|
||||
case: {
|
||||
all_case_content: "全部用例",
|
||||
use_case_detail: "用例詳情",
|
||||
associate_test_cases: "關聯測試用例",
|
||||
dependencies: "依賴關繫",
|
||||
|
|
Loading…
Reference in New Issue