* Fix bug #28091,28092.
This commit is contained in:
@@ -173,6 +173,23 @@ class projectModel extends model
|
||||
return $project;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a project by its shadow product.
|
||||
*
|
||||
* @param int $product
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getByShadowProduct($product)
|
||||
{
|
||||
return $this->dao->select('t2.*')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project=t2.id')
|
||||
->where('t1.product')->eq($product)
|
||||
->andWhere('t2.type')->eq('project')
|
||||
->limit(1)
|
||||
->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get project info.
|
||||
*
|
||||
|
||||
@@ -864,19 +864,14 @@ class story extends control
|
||||
$this->view->hiddenURS = false;
|
||||
$this->view->teamUsers = array();
|
||||
|
||||
if($this->app->tab === 'project' || $this->app->tab === 'execution')
|
||||
if($product->shadow)
|
||||
{
|
||||
$project = $this->dao->findById((int)$objectID)->from(TABLE_PROJECT)->fetch();
|
||||
if(!empty($project->project)) $project = $this->dao->findById((int)$project->project)->from(TABLE_PROJECT)->fetch();
|
||||
$project = $this->project->getByShadowProduct($product->id);
|
||||
$this->view->teamUsers = $this->project->getTeamMemberPairs($project->id);
|
||||
$this->view->hiddenProduct = true;
|
||||
|
||||
if(empty($project->hasProduct))
|
||||
{
|
||||
$this->view->teamUsers = $this->project->getTeamMemberPairs($project->id);
|
||||
$this->view->hiddenProduct = true;
|
||||
|
||||
if($project->model !== 'scrum') $this->view->hiddenPlan = true;
|
||||
if($project->model === 'kanban') $this->view->hiddenURS = true;
|
||||
}
|
||||
if($project->model !== 'scrum') $this->view->hiddenPlan = true;
|
||||
if($project->model === 'kanban') $this->view->hiddenURS = true;
|
||||
}
|
||||
|
||||
/* Display status of branch. */
|
||||
|
||||
Reference in New Issue
Block a user