* fix bug#230
This commit is contained in:
@@ -377,7 +377,7 @@ class bug extends control
|
||||
$this->view->productName = $this->products[$productID];
|
||||
$this->view->moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0);
|
||||
$this->view->stories = $stories;
|
||||
$this->view->projects = $this->product->getProjectPairs($productID);
|
||||
$this->view->projects = $this->loadModel('project')->filterDeleted($this->product->getProjectPairs($productID));
|
||||
$this->view->builds = $builds;
|
||||
$this->view->tasks = $this->loadModel('task')->getProjectTaskPairs($projectID);
|
||||
$this->view->moduleID = $moduleID;
|
||||
|
||||
@@ -769,4 +769,26 @@ class projectModel extends model
|
||||
->fetchAll();
|
||||
return $tasks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter deleted projects
|
||||
*
|
||||
* @param array $projects
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function filterDeleted($projects)
|
||||
{
|
||||
$unDeletedProjects = array();
|
||||
foreach($projects as $projectID => $project)
|
||||
{
|
||||
if($projectID == '') $unDeletedProjects[''] = '';
|
||||
else
|
||||
{
|
||||
$isDeleted = $this->dao->select('deleted')->from(TABLE_PROJECT)->where('id')->eq($projectID)->fetch(false);
|
||||
if($isDeleted->deleted == '0') $unDeletedProjects[$projectID] = $project;
|
||||
}
|
||||
}
|
||||
return $unDeletedProjects;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ class testtask extends control
|
||||
$this->view->position[] = html::a($this->createLink('testtask', 'browse', "productID=$productID"), $this->products[$productID]);
|
||||
$this->view->position[] = $this->lang->testtask->create;
|
||||
|
||||
$this->view->projects = $this->product->getProjectPairs($productID);
|
||||
$this->view->projects = $this->loadModel('project')->filterDeleted($this->product->getProjectPairs($productID));
|
||||
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed|nodeleted');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user