Skip to content
Snippets Groups Projects
Unverified Commit 7fc0c971 authored by Peter Rotich's avatar Peter Rotich Committed by GitHub
Browse files

Merge pull request #4585 from aydreeihn/issue/dashboard-stats

Dashboard Statistics Issue
parents 12176a1b 51a6504f
No related branches found
No related tags found
No related merge requests found
......@@ -219,7 +219,8 @@ class OverviewReport {
->distinct('dept__id');
$times = $times
->filter(array('dept_id__in' => $thisstaff->getDepts()))
->values('dept__id');
->values('dept__id')
->distinct('dept__id');
break;
case 'topic':
$headers = array(__('Help Topic'));
......@@ -232,7 +233,8 @@ class OverviewReport {
->distinct('topic_id');
$times = $times
->values('topic_id')
->filter(array('topic_id__gt' => 0));
->filter(array('topic_id__gt' => 0))
->distinct('topic_id');
break;
case 'staff':
$headers = array(__('Agent'));
......@@ -244,7 +246,7 @@ class OverviewReport {
->values('staff_id', 'staff__firstname', 'staff__lastname')
->filter(array('staff_id__in' => array_keys($staff)))
->distinct('staff_id');
$times = $times->values('staff_id');
$times = $times->values('staff_id')->distinct('staff_id');
$depts = $thisstaff->getManagedDepartments();
if ($thisstaff->hasPerm(ReportModel::PERM_AGENTS))
$depts = array_merge($depts, $thisstaff->getDepts());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment