* Modify the scope of linked stories and bugs in the plan.
This commit is contained in:
@@ -2519,6 +2519,7 @@ class bugModel extends model
|
||||
->beginIF(!$this->app->user->admin)->andWhere('execution')->in('0,' . $this->app->user->view->sprints)->fi()
|
||||
->beginIF($excludeBugs)->andWhere('id')->notIN($excludeBugs)->fi()
|
||||
->beginIF($projectID)->andWhere('project')->eq($projectID)->fi()
|
||||
->beginIF($this->app->rawModule == 'productplan' and $this->app->rawMethod == 'linkbug')->andWhere('branch')->in("0,$branch")->fi()
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy($orderBy)->page($pager)->fetchAll();
|
||||
return $bugs;
|
||||
|
||||
@@ -415,8 +415,8 @@ class productplan extends control
|
||||
else
|
||||
{
|
||||
$this->config->product->search['fields']['branch'] = $this->lang->product->branch;
|
||||
$branches = array('' => '') + $this->loadModel('branch')->getPairs($plan->product);
|
||||
if($plan->branch) $branches = array('' => '', $plan->branch => $branches[$plan->branch]);
|
||||
$branches = $this->loadModel('branch')->getPairs($plan->product);
|
||||
$branches = array('' => '', BRANCH_MAIN => $this->lang->branch->main, $plan->branch => $branches[$plan->branch]);
|
||||
$this->config->product->search['params']['branch']['values'] = $branches;
|
||||
}
|
||||
$this->loadModel('search')->setSearchParams($this->config->product->search);
|
||||
@@ -425,6 +425,7 @@ class productplan extends control
|
||||
|
||||
if($browseType == 'bySearch')
|
||||
{
|
||||
$this->session->set('planBranch', $plan->branch);
|
||||
$allStories = $this->story->getBySearch($plan->product, $plan->branch, $queryID, 'id', '', 'story', array_keys($planStories), $pager);
|
||||
}
|
||||
else
|
||||
@@ -556,8 +557,8 @@ class productplan extends control
|
||||
else
|
||||
{
|
||||
$this->config->bug->search['fields']['branch'] = $this->lang->product->branch;
|
||||
$branches = array('' => '') + $this->loadModel('branch')->getPairs($productID);
|
||||
if($plan->branch) $branches = array('' => '', $plan->branch => $branches[$plan->branch]);
|
||||
$branches = $this->loadModel('branch')->getPairs($productID);
|
||||
$branches = array('' => '', BRANCH_MAIN => $this->lang->branch->main, $plan->branch => $branches[$plan->branch]);
|
||||
$this->config->bug->search['params']['branch']['values'] = $branches;
|
||||
}
|
||||
$this->loadModel('search')->setSearchParams($this->config->bug->search);
|
||||
@@ -570,7 +571,7 @@ class productplan extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$allBugs = $this->bug->getActiveBugs($this->view->product->id, $plan->branch, $executions, array_keys($planBugs), $pager);
|
||||
$allBugs = $this->bug->getActiveBugs($productID, "0,$plan->branch", $executions, array_keys($planBugs), $pager);
|
||||
}
|
||||
|
||||
$this->view->allBugs = $allBugs;
|
||||
|
||||
@@ -2507,6 +2507,7 @@ class storyModel extends model
|
||||
->leftJoin(TABLE_PROJECTSTORY)->alias('t2')->on('t1.id=t2.story')
|
||||
->where($sql)
|
||||
->beginIF($productID != 'all' and $productID != '')->andWhere('t1.`product`')->eq((int)$productID)->fi()
|
||||
->beginIF($this->app->rawModule == 'productplan' and $this->app->rawMethod == 'linkstory')->andWhere('t1.`branch`')->in("0,{$this->session->planBranch}")->fi()
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->andWhere('t1.type')->eq($type)
|
||||
->orderBy($orderBy)
|
||||
|
||||
Reference in New Issue
Block a user