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 f2c-ci-robot[bot]
parent af55ace66b
commit 609fe70eeb
3 changed files with 7 additions and 0 deletions

View File

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

View File

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

View File

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