Merge branch 'master_liuhong_26725' into 'master'
*Fix bug #26725. See merge request easycorp/zentaopms!5049
This commit is contained in:
@@ -1577,10 +1577,11 @@ class executionModel extends model
|
||||
* @param string $status
|
||||
* @param int $limit
|
||||
* @param string $pairs
|
||||
* @param int $appenedID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getByProject($projectID, $status = 'all', $limit = 0, $pairs = false, $devel = false)
|
||||
public function getByProject($projectID, $status = 'all', $limit = 0, $pairs = false, $devel = false, $appendedID = 0)
|
||||
{
|
||||
if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getExecutionPairs();
|
||||
|
||||
@@ -1597,6 +1598,7 @@ class executionModel extends model
|
||||
->beginIF($status != 'all' and $status != 'undone' and $status != 'noclosed')->andWhere('status')->in($status)->fi()
|
||||
->beginIF($status == 'noclosed')->andWhere('status')->ne('closed')->fi()
|
||||
->beginIF($devel === true)->andWhere('attribute')->in('dev,qa,release')->fi()
|
||||
->beginIF($appendedID)->orWhere('id')->eq($appendedID)->fi()
|
||||
->orderBy($orderBy)
|
||||
->beginIF($limit)->limit($limit)->fi()
|
||||
->fetchAll('id');
|
||||
|
||||
@@ -623,7 +623,7 @@ class task extends control
|
||||
$this->view->users = $this->loadModel('user')->getPairs('nodeleted|noclosed', "{$this->view->task->openedBy},{$this->view->task->canceledBy},{$this->view->task->closedBy}");
|
||||
$this->view->showAllModule = isset($this->config->execution->task->allModule) ? $this->config->execution->task->allModule : '';
|
||||
$this->view->modules = $this->tree->getTaskOptionMenu($this->view->task->execution, 0, 0, $this->view->showAllModule ? 'allModule' : '');
|
||||
$this->view->executions = $this->config->systemMode == 'classic' ? $this->execution->getPairs() : $this->execution->getByProject($task->project, 'all', 0, true);
|
||||
$this->view->executions = $this->config->systemMode == 'classic' ? $this->execution->getPairs() : $this->execution->getByProject($task->project, 'noclosed', 0, true, false, $task->execution);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user