diff --git a/backend/src/main/java/io/metersphere/track/request/testcase/TestPlanCaseBatchRequest.java b/backend/src/main/java/io/metersphere/track/request/testcase/TestPlanCaseBatchRequest.java index a89d15497c..268097a857 100644 --- a/backend/src/main/java/io/metersphere/track/request/testcase/TestPlanCaseBatchRequest.java +++ b/backend/src/main/java/io/metersphere/track/request/testcase/TestPlanCaseBatchRequest.java @@ -12,4 +12,5 @@ import java.util.List; public class TestPlanCaseBatchRequest extends TestPlanTestCase { private List ids; private TestPlanFuncCaseConditions condition; + private boolean modifyExecutor; } diff --git a/backend/src/main/java/io/metersphere/track/service/TestPlanTestCaseService.java b/backend/src/main/java/io/metersphere/track/service/TestPlanTestCaseService.java index bb68addb14..9c32ee0370 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanTestCaseService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanTestCaseService.java @@ -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( diff --git a/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseList.vue b/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseList.vue index e7235eb5ca..0dbb58a0a2 100644 --- a/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseList.vue +++ b/frontend/src/business/components/track/plan/view/comonents/functional/FunctionalTestCaseList.vue @@ -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();