diff --git a/module/common/view/kanban.html.php b/module/common/view/kanban.html.php
index f4ac2b3e97..1298351c42 100644
--- a/module/common/view/kanban.html.php
+++ b/module/common/view/kanban.html.php
@@ -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)
{
diff --git a/module/execution/control.php b/module/execution/control.php
index ae716858cd..460d390d38 100644
--- a/module/execution/control.php
+++ b/module/execution/control.php
@@ -1881,6 +1881,7 @@ class execution extends control
$avatarPairs = $this->dao->select('account, avatar')->from(TABLE_USER)->where('deleted')->eq(0)->fetchPairs();
foreach($avatarPairs as $account => $avatar)
{
+ if(!$avatar) continue;
$userList[$account]['avatar'] = $avatar;
}
diff --git a/module/product/model.php b/module/product/model.php
index d8be0d310d..de3ec6e0e7 100644
--- a/module/product/model.php
+++ b/module/product/model.php
@@ -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');
diff --git a/module/weekly/model.php b/module/weekly/model.php
index 42a2ddb47e..349231ae93 100644
--- a/module/weekly/model.php
+++ b/module/weekly/model.php
@@ -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);
}