From 609fe70eebbc9ee19ac45aa5e3478f71ddf75aec Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Mon, 9 May 2022 11:15:25 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E5=8A=9F=E8=83=BD=E7=94=A8?= =?UTF-8?q?=E4=BE=8B=E6=89=B9=E9=87=8F=E6=9B=B4=E6=94=B9=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=E7=9A=84=E6=89=A7=E8=A1=8C=E7=BB=93=E6=9E=9C=EF=BC=8C=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E4=BA=BA=E6=9C=AA=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1013047 --user=李玉号 【测试跟踪】github #13364 测试计划里功能用例的执行人为A时,B用户批量更改用例的执行结果后,执行人未变更为A https://www.tapd.cn/55049933/s/1154487 Closes #13364 --- .../track/request/testcase/TestPlanCaseBatchRequest.java | 1 + .../io/metersphere/track/service/TestPlanTestCaseService.java | 3 +++ .../plan/view/comonents/functional/FunctionalTestCaseList.vue | 3 +++ 3 files changed, 7 insertions(+) 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();