* Fix bug #26743. And modify the unit case of batch edit under the execution module.

This commit is contained in:
hufangzhou
2022-08-22 16:09:39 +08:00
parent 1ff75bb2af
commit c34766a68d
3 changed files with 7 additions and 4 deletions
+3
View File
@@ -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')
+1 -1
View File
@@ -1,5 +1,5 @@
<?php
$config->test = new stdclass;
$config->test->dbPrefix = "db_";
$config->test->rawDB = 'zentaounittest';
$config->test->rawDB = 'zentaounit';
$config->test->dbNum = 10;
+3 -3
View File
@@ -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();
r($execution->batchUpdateObject($noName, $executionID)) && p('name:0') && e('『迭代名称』不能为空。'); // 测试name为空
$db->restoreDB();