* Fix kanban details.
This commit is contained in:
@@ -428,8 +428,9 @@ $.extend($.fn.kanban.Constructor.DEFAULTS,
|
||||
doingProjectCount = $doingProjectItems.find('.project-item').length;
|
||||
doingExecutionCount = $doingProjectItems.find('.execution-item').length;
|
||||
}
|
||||
$kanban.find('.kanban-header-col[data-type="doingProject"] > .title > .count').text(doingProjectCount || 0);
|
||||
$kanban.find('.kanban-header-col[data-type="doingExecution"] > .title > .count').text(doingExecutionCount || 0);
|
||||
|
||||
if(doingProjectCount > 0) $kanban.find('.kanban-header-col[data-type="doingProject"] > .title > .count').text(doingProjectCount);
|
||||
if(doingExecutionCount > 0) $kanban.find('.kanban-header-col[data-type="doingExecution"] > .title > .count').text(doingExecutionCount);
|
||||
},
|
||||
onCreate(kanban)
|
||||
{
|
||||
|
||||
@@ -1362,7 +1362,7 @@ class productModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getStats($orderBy = 'order_desc', $pager = null, $status = 'noclosed', $line = 0, $storyType = 'story', $programID = 0)
|
||||
public function getStats($orderBy = 'order_asc', $pager = null, $status = 'noclosed', $line = 0, $storyType = 'story', $programID = 0)
|
||||
{
|
||||
$this->loadModel('report');
|
||||
$this->loadModel('story');
|
||||
|
||||
+20
-7
@@ -443,13 +443,26 @@ class weeklyModel extends model
|
||||
$executions = $this->loadModel('execution')->getList($project, 'all', 'all', 0, 0, 0);
|
||||
$executionIdList = array_keys($executions);
|
||||
|
||||
$AC = $this->dao->select('sum(consumed) as consumed')
|
||||
->from(TABLE_EFFORT)
|
||||
->where('objectType')->eq('task')
|
||||
->andWhere('execution')->in($executionIdList)
|
||||
->andWhere('date')->ge($monday)
|
||||
->andWhere('date')->lt($nextMonday)
|
||||
->fetch('consumed');
|
||||
if(isset($this->config->proVersion))
|
||||
{
|
||||
$AC = $this->dao->select('sum(consumed) as consumed')
|
||||
->from(TABLE_EFFORT)
|
||||
->where('objectType')->eq('task')
|
||||
->andWhere('execution')->in($executionIdList)
|
||||
->andWhere('date')->ge($monday)
|
||||
->andWhere('date')->lt($nextMonday)
|
||||
->fetch('consumed');
|
||||
}
|
||||
else
|
||||
{
|
||||
$taskIdList = $this->dao->select('id')->from(TABLE_TASK)->where('execution')->in($executionIdList)->fetchPairs();
|
||||
$AC = $this->dao->select('sum(consumed) as consumed')
|
||||
->from(TABLE_TASKESTIMATE)
|
||||
->where('task')->in($taskIdList)
|
||||
->andWhere('date')->ge($monday)
|
||||
->andWhere('date')->lt($nextMonday)
|
||||
->fetch('consumed');
|
||||
}
|
||||
|
||||
return round($AC, 2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user