* fix task not show in cmmigantt block sometimes.
This commit is contained in:
@@ -1118,7 +1118,7 @@ class block extends control
|
||||
$productID = isset($this->session->product) ? 0 : $this->session->product;
|
||||
if($productID && !array_key_exists($productID, $products)) $productID = 0;
|
||||
|
||||
$this->view->plans = $this->loadModel('programplan')->getDataForGantt($this->session->program, $productID);
|
||||
$this->view->plans = $this->loadModel('programplan')->getDataForGantt($this->session->program, $productID, 0, 'task');
|
||||
$this->view->products = $products;
|
||||
$this->view->productID = $productID;
|
||||
}
|
||||
|
||||
@@ -99,7 +99,17 @@ class programplanModel extends model
|
||||
return $pairs;
|
||||
}
|
||||
|
||||
public function getDataForGantt($programID, $productID, $baselineID = 0)
|
||||
/**
|
||||
* Get gantt data
|
||||
*
|
||||
* @param int $programID
|
||||
* @param int $productID
|
||||
* @param int $baselineID
|
||||
* @param string $selectCustom
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getDataForGantt($programID, $productID, $baselineID = 0, $selectCustom = '')
|
||||
{
|
||||
$this->loadModel('stage');
|
||||
|
||||
@@ -161,7 +171,8 @@ class programplanModel extends model
|
||||
$section = 'browse';
|
||||
$object = 'stageCustom';
|
||||
$setting = $this->loadModel('setting');
|
||||
$selectCustom = $setting->getItem("owner={$owner}&module={$module}§ion={$section}&key={$object}");
|
||||
|
||||
if(empty($selectCustom)) $selectCustom = $setting->getItem("owner={$owner}&module={$module}§ion={$section}&key={$object}");
|
||||
|
||||
$tasks = array();
|
||||
if(strpos($selectCustom, 'task') !== false)
|
||||
|
||||
Reference in New Issue
Block a user