diff --git a/module/execution/model.php b/module/execution/model.php index 565fe0662e..4ea00ac152 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -4172,7 +4172,7 @@ class executionModel extends model } else { - $this->config->execution->search['params']['execution']['values'] = $showAll ? $executions : array(''=>'', $executionID => $executions[$executionID], 'all' => $this->lang->execution->allExecutions); + $this->config->execution->search['params']['execution']['values'] = $showAll ? $executions : array(''=>'', $executionID => zget($executions, $executionID, ''), 'all' => $this->lang->execution->allExecutions); } $projects = $this->loadModel('project')->getPairsByProgram(); diff --git a/module/execution/test/model/buildtasksearchform.php b/module/execution/test/model/buildtasksearchform.php index 52e6ed5707..2810a19463 100755 --- a/module/execution/test/model/buildtasksearchform.php +++ b/module/execution/test/model/buildtasksearchform.php @@ -44,18 +44,20 @@ title=测试executionModel->buildTaskSearchFrom(); cid=1 pid=1 -正确的执行,正确的queryID >> 1 -错误的执行,正确的queryID >> 1 -正确的执行,错误的queryID >> 0 -错误的执行,错误的queryID >> 0 +- 正确的执行,正确的queryID @1 +- 错误的执行,正确的queryID @1 +- 正确的执行,错误的queryID @0 +- 错误的执行,错误的queryID @0 +- 正确的执行,正确的queryID @2 */ $executionIDList = array('3', '0'); -$queryIDList = array('0', '1'); +$queryIDList = array('0', '1', '2'); $execution = new executionTest(); r($execution->buildTaskSearchFormTest($executionIDList[0], $queryIDList[1])) && p() && e('1'); // 正确的执行,正确的queryID r($execution->buildTaskSearchFormTest($executionIDList[1], $queryIDList[1])) && p() && e('1'); // 错误的执行,正确的queryID r($execution->buildTaskSearchFormTest($executionIDList[0], $queryIDList[0])) && p() && e('0'); // 正确的执行,错误的queryID r($execution->buildTaskSearchFormTest($executionIDList[1], $queryIDList[0])) && p() && e('0'); // 错误的执行,错误的queryID +r($execution->buildTaskSearchFormTest($executionIDList[1], $queryIDList[2])) && p() && e('2'); // 正确的执行,正确的queryID