* Change the get execution paris method.

This commit is contained in:
tianshujie
2023-08-08 16:02:11 +08:00
parent e3bb2c1f64
commit 0dd10f48dc
2 changed files with 21 additions and 1 deletions
+20
View File
@@ -1714,6 +1714,26 @@ class executionModel extends model
return $pairs;
}
/**
* Get an array of task id:name.
*
* @param int $projectID
* @access public
* @return array
*/
public function fetchPairs($projectID = 0, $type = 'all', $filterMulti = true)
{
return $this->dao->select('id,name')->from(TABLE_EXECUTION)
->where('deleted')->eq(0)
->andWhere('vision')->eq($this->config->vision)
->beginIF($projectID)->andWhere('project')->eq($projectID)->fi()
->beginIF($type == 'all')->andWhere('type')->in('stage,sprint,kanban')->fi()
->beginIF($type != 'all')->andWhere('type')->in($type)->fi()
->beginIF($filterMulti)->andWhere('multiple')->eq('1')->fi()
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->sprints)->fi()
->fetchPairs();
}
/**
* Get execution by idList.
*