This commit is contained in:
hufangzhou
2020-12-01 15:20:34 +08:00
5 changed files with 9 additions and 9 deletions
+3 -3
View File
@@ -855,7 +855,7 @@ class block extends control
if($project->model == 'scrum')
{
$project->progress = $project->allStories == 0 ? 0 : round($project->doneStories / $project->allStories, 3) * 100;
$project->executions = $this->project->getExecutionStats($projectID, 'all', 0, 0, 30, 'path_asc,id_asc');
$project->executions = $this->project->getExecutionStats($projectID, 'all', 0, 0, 30, 'id_asc,path_asc');
}
elseif($project->model == 'waterfall')
{
@@ -1307,7 +1307,7 @@ class block extends control
$count = isset($this->params->count) ? (int)$this->params->count : 15;
$type = isset($this->params->type) ? $this->params->type : 'all';
$pager = pager::init(0, $count, 1);
$this->view->executionStats = $this->loadModel('project')->getExecutionStats($this->session->PRJ, $type, 0, 0, 30, 'path_asc,id_asc', $pager);
$this->view->executionStats = $this->loadModel('project')->getExecutionStats($this->session->PRJ, $type, 0, 0, 30, 'id_asc,path_asc', $pager);
}
/**
@@ -1641,7 +1641,7 @@ class block extends control
$pager = pager::init(0, $count, 1);
$projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->PRJ;
$this->view->executionStats = $this->loadModel('project')->getExecutionStats($projectID, $status, 0, 0, 30, 'path_asc,id_asc', $pager);
$this->view->executionStats = $this->loadModel('project')->getExecutionStats($projectID, $status, 0, 0, 30, 'id_asc,path_asc', $pager);
}
/**
+1 -1
View File
@@ -785,7 +785,7 @@ class productModel extends model
* @access public
* @return array
*/
public function getExecutionPairsByProduct($productID, $branch = 0, $orderBy = 'path_asc,id_asc')
public function getExecutionPairsByProduct($productID, $branch = 0, $orderBy = 'id_asc,path_asc')
{
if(!$this->session->PRJ || !$productID) return array();
+1 -1
View File
@@ -842,7 +842,7 @@ class programModel extends model
$this->app->loadClass('pager', $static = true);
foreach($projects as $projectID => $project)
{
$orderBy = $project->model == 'waterfall' ? 'path_asc,id_asc' : 'id_desc';
$orderBy = $project->model == 'waterfall' ? 'id_asc,path_asc' : 'id_desc';
$pager = $project->model == 'waterfall' ? null : new pager(0, 1, 1);
$project->executions = $this->project->getExecutionStats($projectID, 'undone', 0, 0, 30, $orderBy, $pager);
$project->teamCount = isset($teams[$projectID]) ? $teams[$projectID]->count : 0;
+2 -2
View File
@@ -2487,7 +2487,7 @@ class project extends control
* @access public
* @return void
*/
public function all($status = 'all', $projectID = 0, $orderBy = 'path_asc,id_asc', $productID = 0, $recTotal = 0, $recPerPage = 10, $pageID = 1)
public function all($status = 'all', $projectID = 0, $orderBy = 'id_asc,path_asc', $productID = 0, $recTotal = 0, $recPerPage = 10, $pageID = 1)
{
$this->app->loadLang('my');
$this->app->loadLang('programplan');
@@ -2598,7 +2598,7 @@ class project extends control
unset($fields[$key]);
}
$projectStats = $this->project->getExecutionStats($this->session->PRJ, $status == 'byproduct' ? 'all' : $status, $productID, 0, 30, 'path_asc,id_asc');
$projectStats = $this->project->getExecutionStats($this->session->PRJ, $status == 'byproduct' ? 'all' : $status, $productID, 0, 30, 'id_asc,path_asc');
$users = $this->loadModel('user')->getPairs('noletter');
foreach($projectStats as $i => $project)
{
+2 -2
View File
@@ -1021,7 +1021,7 @@ class projectModel extends model
->beginIF($status == 'undone')->andWhere('status')->notIN('done,closed')->fi()
->beginIF($status != 'all' and $status != 'undone')->andWhere('status')->in($status)->fi()
->andWhere('deleted')->eq('0')
->orderBy('path_asc,id_asc')
->orderBy('id_asc,path_asc')
->beginIF($limit)->limit($limit)->fi()
->fetchAll('id');
@@ -1071,7 +1071,7 @@ class projectModel extends model
* @access public
* @return void
*/
public function getExecutionStats($projectID = 0, $status = 'undone', $productID = 0, $branch = 0, $itemCounts = 30, $orderBy = 'path_asc,id_asc', $pager = null)
public function getExecutionStats($projectID = 0, $status = 'undone', $productID = 0, $branch = 0, $itemCounts = 30, $orderBy = 'id_asc,path_asc', $pager = null)
{
if(empty($productID))
{