campai-bv / autotask-dashboards-os

Dashboards for Autotask - Slick ticket performance dashboard to provide your teams with an at-a-glance status overview.
http://autotask.campai.nl
11 stars 6 forks source link

Resource Widget Display #72

Open skirst opened 10 years ago

skirst commented 10 years ago

Is there a way to limit the displayed resources similar to the "Top Ticket" widget? I would like to select all the resources to be sorted, but only display the top 5 (or any number) based on hours worked or tickets closed. In cases where you have 20+ resources, this will make the widget smaller and easier to organize in the dashboard.

skirst commented 10 years ago

Also (possible bug) when you do have the resource widget displayed with 20+ (my exact count is 25) resources selected and you reorganize the widgets to span across the dashboard it resets and everything shifts left when you 'Save'. After this happens, you lose the 6th column (on the far right) completely until you either remove resources to be under 18-to-20 or you remove the widget completely.

coencoppens commented 10 years ago

@skirst that would be possible with a small adjustment. Though I'm adding it to the roadmap as a feature, here's a temporary workaround.

Assuming you're running 1.5.1, starting from Line 225 you can manipulate the results a bit (not tested):

$aResourceTotals['Resource'] = Hash::sort($aResourceTotals['Resource'], '{n}.time_totals.hours_worked', 'desc', 'numeric');

if (5 < count($aResourceTotals['Resource'])) {
    $aChunks = array_chunk($aResourceTotals['Resource'], 5);
    $aResourceTotals['Resource'] = $aChunks[0];
}

return $aResourceTotals;
coencoppens commented 10 years ago

As far as the reorganizing goes: this is an issue related to #61 - continuing there.

skirst commented 10 years ago

It did take some time for the dashboard to reflect the update, but I have verified it works. Thanks for the help!

Note: I found that 8 seems to be the best number to fully fill two rows.

coencoppens commented 10 years ago

Great!