* Finish task #5104.
This commit is contained in:
@@ -363,7 +363,7 @@ class task extends control
|
||||
$noclosedProjects = $this->project->getPairs('noclosed,nocode');
|
||||
unset($noclosedProjects[$this->view->project->id]);
|
||||
$this->view->projects = array($this->view->project->id => $this->view->project->name) + $noclosedProjects;
|
||||
$tasks = $this->task->getParentTaskPairs($this->view->project->id);
|
||||
$tasks = $this->task->getParentTaskPairs($this->view->project->id, $this->view->task->parent);
|
||||
if(isset($tasks[$taskID])) unset($tasks[$taskID]);
|
||||
|
||||
if(!isset($this->view->members[$this->view->task->assignedTo])) $this->view->members[$this->view->task->assignedTo] = $this->view->task->assignedTo;
|
||||
|
||||
@@ -1878,16 +1878,18 @@ class taskModel extends model
|
||||
* Get project parent tasks pairs.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param string $append
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getParentTaskPairs($projectID)
|
||||
public function getParentTaskPairs($projectID, $append = '')
|
||||
{
|
||||
$tasks = $this->dao->select('id, name')->from(TABLE_TASK)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('parent')->le(0)
|
||||
->andWhere('status')->notin('cancel,closed')
|
||||
->andWhere('project')->eq($projectID)
|
||||
->beginIF($append)->orWhere('id')->in($append)->fi()
|
||||
->fetchPairs();
|
||||
|
||||
foreach($tasks as $id => $name)
|
||||
|
||||
Reference in New Issue
Block a user