* Modify data for execution list statistics.

This commit is contained in:
qiyu-xie
2021-03-10 13:45:17 +08:00
parent 1082a2425f
commit 799dfff698
3 changed files with 7 additions and 2 deletions
+3 -1
View File
@@ -2591,10 +2591,12 @@ class execution extends control
$executionID = $execution->id;
}
$this->session->set('executionList', $this->app->getURI(true));
$projectID = 0;
}
elseif($from == 'project')
{
$this->lang->navGroup->execution = 'project';
$projectID = $this->session->PRJ;
}
/* Load pager and get tasks. */
@@ -2604,7 +2606,7 @@ class execution extends control
$this->view->title = $this->lang->execution->allExecutions;
$this->view->position[] = $this->lang->execution->allExecutions;
$this->view->executionStats = $this->project->getStats($this->session->PRJ, $status, $productID, 0, 30, $orderBy, $pager);
$this->view->executionStats = $this->project->getStats($projectID, $status, $productID, 0, 30, $orderBy, $pager);
$this->view->products = array(0 => $this->lang->product->select) + $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
$this->view->productID = $productID;
$this->view->executionID = $executionID;
+2
View File
@@ -896,6 +896,8 @@ class executionModel extends model
*/
public function getSwitcher($executionID, $currentModule, $currentMethod)
{
if($currentMethod == 'index' or $currentMethod == 'all') return;
$this->session->set('moreExecutionLink', $this->app->getURI(true));
$currentExecutionName = $this->lang->execution->common;
+2 -1
View File
@@ -1439,7 +1439,8 @@ class projectModel extends model
if(empty($productID))
{
$executions = $this->dao->select('*')->from(TABLE_EXECUTION)
->where('project')->eq($projectID)
->where('type')->in('sprint,stage')
->beginIF($projectID != 0)->andWhere('project')->eq($projectID)->fi()
->beginIF($status == 'undone')->andWhere('status')->notIN('done,closed')->fi()
->beginIF($status != 'all' and $status != 'undone')->andWhere('status')->eq($status)->fi()
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->sprints)->fi()