From c34766a68dceca26a49dd03756a61c87f111539b Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Mon, 22 Aug 2022 16:09:39 +0800 Subject: [PATCH] * Fix bug #26743. And modify the unit case of batch edit under the execution module. --- module/execution/model.php | 3 +++ test/config/config.php | 2 +- test/model/execution/batchupdate.php | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index c2f067fe39..c98202fb50 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -785,6 +785,9 @@ class executionModel extends model return false; } + /* Replace the project language item for message. */ + $this->lang->project->name = $this->lang->execution->name; + $this->lang->project->code = $this->lang->execution->code; $this->dao->update(TABLE_EXECUTION)->data($execution) ->autoCheck($skipFields = 'begin,end') ->batchcheck($this->config->execution->edit->requiredFields, 'notempty') diff --git a/test/config/config.php b/test/config/config.php index df921468b6..e2833b7249 100644 --- a/test/config/config.php +++ b/test/config/config.php @@ -1,5 +1,5 @@ test = new stdclass; $config->test->dbPrefix = "db_"; -$config->test->rawDB = 'zentaounittest'; +$config->test->rawDB = 'zentaounit'; $config->test->dbNum = 10; diff --git a/test/model/execution/batchupdate.php b/test/model/execution/batchupdate.php index b0782fd400..5bd1b37d1d 100755 --- a/test/model/execution/batchupdate.php +++ b/test/model/execution/batchupdate.php @@ -12,7 +12,7 @@ cid=1 pid=1 测试批量修改任务 >> name,迭代1,批量修改执行一 -测试name为空 >> 『name』不能为空。 +测试name为空 >> 『迭代名称』不能为空。 */ @@ -30,5 +30,5 @@ $noName = array('statuses'=> $statuses, 'codes' => $code, 'PMs' => $pms, 'lifet $execution = new executionTest(); r($execution->batchUpdateObject($normal, $executionID)) && p('0:field,old,new') && e('name,迭代1,批量修改执行一'); // 测试批量修改任务 -r($execution->batchUpdateObject($noName, $executionID)) && p() && e('『name』不能为空。'); // 测试name为空 -$db->restoreDB(); \ No newline at end of file +r($execution->batchUpdateObject($noName, $executionID)) && p('name:0') && e('『迭代名称』不能为空。'); // 测试name为空 +$db->restoreDB();