fix(测试跟踪): 测试计划功能用例批量更改用例的执行结果,执行人未变更

--bug=1013047 --user=李玉号 【测试跟踪】github
#13364
测试计划里功能用例的执行人为A时,B用户批量更改用例的执行结果后,执行人未变更为A
https://www.tapd.cn/55049933/s/1154487

Closes #13364
This commit is contained in:
shiziyuan9527 2022-05-09 11:15:25 +08:00 committed by shiziyuan9527
parent a924757523
commit 991fd9c8a5
3 changed files with 7 additions and 0 deletions

View File

@ -12,4 +12,5 @@ import java.util.List;
public class TestPlanCaseBatchRequest extends TestPlanTestCase { public class TestPlanCaseBatchRequest extends TestPlanTestCase {
private List<String> ids; private List<String> ids;
private TestPlanFuncCaseConditions condition; private TestPlanFuncCaseConditions condition;
private boolean modifyExecutor;
} }

View File

@ -130,6 +130,9 @@ public class TestPlanTestCaseService {
public void editTestCaseBath(TestPlanCaseBatchRequest request) { public void editTestCaseBath(TestPlanCaseBatchRequest request) {
TestPlanTestCaseExample testPlanTestCaseExample = getBatchExample(request); TestPlanTestCaseExample testPlanTestCaseExample = getBatchExample(request);
TestPlanTestCaseWithBLOBs testPlanTestCase = new TestPlanTestCaseWithBLOBs(); TestPlanTestCaseWithBLOBs testPlanTestCase = new TestPlanTestCaseWithBLOBs();
if (BooleanUtils.isFalse(request.isModifyExecutor()) && StringUtils.isNotBlank(SessionUtils.getUserId())) {
request.setExecutor(SessionUtils.getUserId());
}
BeanUtils.copyBean(testPlanTestCase, request); BeanUtils.copyBean(testPlanTestCase, request);
testPlanTestCase.setUpdateTime(System.currentTimeMillis()); testPlanTestCase.setUpdateTime(System.currentTimeMillis());
testPlanTestCaseMapper.updateByExampleSelective( testPlanTestCaseMapper.updateByExampleSelective(

View File

@ -721,6 +721,9 @@ export default {
batchEdit(form) { batchEdit(form) {
let param = buildBatchParam(this, this.$refs.table.selectIds); let param = buildBatchParam(this, this.$refs.table.selectIds);
param[form.type] = form.value; param[form.type] = form.value;
if (form.type === 'executor') {
param['modifyExecutor'] = true;
}
param.ids = this.$refs.table.selectIds; param.ids = this.$refs.table.selectIds;
this.$post('/test/plan/case/batch/edit', param, () => { this.$post('/test/plan/case/batch/edit', param, () => {
this.$refs.table.clear(); this.$refs.table.clear();