aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Dashboard.pm
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2017-11-30 15:22:31 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-12-15 17:35:53 +0000
commitaf7a457bfaed2ba143aaeccfc7ccf2b8d443e22d (patch)
tree7c8244118b58600e314d77b682817927f68f2500 /perllib/FixMyStreet/App/Controller/Dashboard.pm
parentfb75d4f912c504b42d11f2c8f32b5dcff2b348b6 (diff)
[fixmystreet.com] Council average response time.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Dashboard.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Dashboard.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Dashboard.pm b/perllib/FixMyStreet/App/Controller/Dashboard.pm
index cff4c8dab..e1183c247 100644
--- a/perllib/FixMyStreet/App/Controller/Dashboard.pm
+++ b/perllib/FixMyStreet/App/Controller/Dashboard.pm
@@ -287,6 +287,13 @@ sub generate_summary_figures {
}
}
+sub generate_body_response_time : Private {
+ my ( $self, $c ) = @_;
+
+ my $avg = $c->stash->{body}->calculate_average;
+ $c->stash->{body_average} = $avg ? int($avg / 60 / 60 / 24 + 0.5) : 0;
+}
+
sub export_as_csv {
my ($self, $c) = @_;
require Text::CSV;