* Translate modified code.
This commit is contained in:
@@ -2499,7 +2499,7 @@ class bugModel extends model
|
||||
}
|
||||
|
||||
$allBranch = "`branch` = 'all'";
|
||||
if($branch !== 'all' and $branch !== '' and strpos($bugQuery, '`branch` =') === false) $bugQuery .= " AND `branch` in('$branch')";
|
||||
if($branch !== 'all' and strpos($bugQuery, '`branch` =') === false) $bugQuery .= " AND `branch` in($branch)";
|
||||
if(strpos($bugQuery, $allBranch) !== false) $bugQuery = str_replace($allBranch, '1', $bugQuery);
|
||||
|
||||
$allProject = "`project` = 'all'";
|
||||
@@ -2519,7 +2519,6 @@ 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,{$this->session->planBranch}")->fi()
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy($orderBy)->page($pager)->fetchAll();
|
||||
return $bugs;
|
||||
|
||||
@@ -226,7 +226,6 @@ class product extends control
|
||||
$this->session->set('currentProductType', $product->type);
|
||||
$productBranches = $product->type != 'normal' ? $this->loadModel('execution')->getBranchByProduct($product->id, $projectID) : array();
|
||||
$branches = isset($productBranches[$product->id]) ? $productBranches[$product->id] : array();
|
||||
|
||||
}
|
||||
|
||||
$this->products = $this->product->getProducts($projectID, 'all', '', false);
|
||||
|
||||
@@ -425,8 +425,7 @@ class productplan extends control
|
||||
|
||||
if($browseType == 'bySearch')
|
||||
{
|
||||
$this->session->set('planBranch', $plan->branch);
|
||||
$allStories = $this->story->getBySearch($plan->product, '', $queryID, 'id', '', 'story', array_keys($planStories), $pager);
|
||||
$allStories = $this->story->getBySearch($plan->product, $plan->branch ? "0,{$plan->branch}" : 0, $queryID, 'id', '', 'story', array_keys($planStories), $pager);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -567,12 +566,11 @@ class productplan extends control
|
||||
|
||||
if($browseType == 'bySearch')
|
||||
{
|
||||
$this->session->set('planBranch', $plan->branch);
|
||||
$allBugs = $this->bug->getBySearch($productID, '', $queryID, 'id_desc', array_keys($planBugs), $pager);
|
||||
$allBugs = $this->bug->getBySearch($productID, $plan->branch ? "0,{$plan->branch}" : 0, $queryID, 'id_desc', array_keys($planBugs), $pager);
|
||||
}
|
||||
else
|
||||
{
|
||||
$allBugs = $this->bug->getActiveBugs($productID, "0,$plan->branch", $executions, array_keys($planBugs), $pager);
|
||||
$allBugs = $this->bug->getActiveBugs($productID, "0,{$plan->branch}", $executions, array_keys($planBugs), $pager);
|
||||
}
|
||||
|
||||
$this->view->allBugs = $allBugs;
|
||||
|
||||
@@ -221,6 +221,7 @@ class productplanModel extends model
|
||||
$plans = $this->dao->select('id,title,parent,begin,end')->from(TABLE_PRODUCTPLAN)
|
||||
->where('product')->in($product)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->andWhere('end')->ge($date)
|
||||
->beginIF($branch !== 'all' or $branch !== '')->andWhere("branch")->in($branch)->fi()
|
||||
->beginIF($skipParent)->andWhere('parent')->ne(-1)->fi()
|
||||
->orderBy('begin desc')
|
||||
|
||||
@@ -2476,7 +2476,7 @@ class storyModel extends model
|
||||
}
|
||||
elseif($branch)
|
||||
{
|
||||
if($branch and strpos($storyQuery, '`branch` =') === false) $storyQuery .= " AND `branch` in('$branch')";
|
||||
if($branch and strpos($storyQuery, '`branch` =') === false) $storyQuery .= " AND `branch` in($branch)";
|
||||
}
|
||||
$storyQuery = preg_replace("/`plan` +LIKE +'%([0-9]+)%'/i", "CONCAT(',', `plan`, ',') LIKE '%,$1,%'", $storyQuery);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user