* Adjust product module.

This commit is contained in:
leiyong
2020-11-30 13:04:37 +08:00
parent bfef3210cc
commit 7b8e7b4c65
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -78,7 +78,7 @@ class product extends control
$this->product->setMenu($this->products, $productID, $branch);
$this->app->loadLang('my');
$this->view->projectStats = $this->loadModel('project')->getProjectStats($status, $productID, $branch);
$this->view->projectStats = $this->loadModel('project')->getExecutionStats(0, 'undone', $productID, $branch);
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->product->project;
$this->view->position[] = $this->products[$productID];
+1 -1
View File
@@ -2597,7 +2597,7 @@ class project extends control
unset($fields[$key]);
}
$projectStats = $this->project->getProjectStats($status == 'byproduct' ? 'all' : $status, $productID, 0, 30, $orderBy, null, $this->session->PRJ);
$projectStats = $this->project->getExecutionStats($this->session->PRJ, $status == 'byproduct' ? 'all' : $status, $productID, 0, 30, 'path_asc,id_asc');
$users = $this->loadModel('user')->getPairs('noletter');
foreach($projectStats as $i => $project)
{
+1 -1
View File
@@ -1101,7 +1101,7 @@ class projectModel extends model
$executions = $this->dao->select('t2.*')->from(TABLE_PROJECTPRODUCT)->alias('t1')
->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.project=t2.id')
->where('t1.product')->eq($productID)
->andWhere('t2.project')->eq($projectID)
->beginIF($projectID)->andWhere('t2.project')->eq($projectID)->fi()
->beginIF($status == 'undone')->andWhere('t2.status')->notIN('done,closed')->fi()
->beginIF($status != 'all' and $status != 'undone')->andWhere('t2.status')->eq($status)->fi()
->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->sprints)->fi()